Program Listing for File config.h

Return to documentation for file (include/config.h)

#ifndef MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_CONFIG_H
#define MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_CONFIG_H

#include <cstdint>
#include <string>
#include <vector>
#include "include/api/dual_abi_helper.h"

namespace mindspore {
namespace dataset {

// Config operations for setting and getting the configuration.
namespace config {

bool  set_seed(int32_t seed);

uint32_t  get_seed();

bool  set_prefetch_size(int32_t prefetch_size);

int32_t  get_prefetch_size();

bool  set_num_parallel_workers(int32_t num_parallel_workers);

int32_t  get_num_parallel_workers();

bool  set_monitor_sampling_interval(int32_t interval);

int32_t  get_monitor_sampling_interval();

bool  set_callback_timeout(int32_t timeout);

int32_t  get_callback_timeout();

bool  load(const std::vector<char> &file);

inline bool  load(std::string file) { return load(StringToChar(file)); }

}  // namespace config
}  // namespace dataset
}  // namespace mindspore

#endif  // MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_CONFIG_H