Program Listing for File config.h

Return to documentation for file (include/runtime/include/dataset/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"
#include "include/api/types.h"

namespace mindspore {
namespace dataset {
// Config operations for setting and getting the configuration.
namespace config {
bool DATASET_API set_seed(int32_t seed);

uint32_t DATASET_API get_seed();

bool DATASET_API set_prefetch_size(int32_t prefetch_size);

int32_t DATASET_API get_prefetch_size();

bool DATASET_API set_num_parallel_workers(int32_t num_parallel_workers);

int32_t DATASET_API get_num_parallel_workers();

bool DATASET_API set_monitor_sampling_interval(int32_t interval);

int32_t DATASET_API get_monitor_sampling_interval();

bool DATASET_API set_callback_timeout(int32_t timeout);

int32_t DATASET_API get_callback_timeout();

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

inline bool DATASET_API load(const std::string &file) { return load(StringToChar(file)); }
}  // namespace config
}  // namespace dataset
}  // namespace mindspore
#endif  // MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_CONFIG_H