9#include <initializer_list>
30 void Make_normal(
Storage &Sin,
const double &mean,
const double &std,
const unsigned int &seed=std::random_device()());
47 void Make_uniform(
Storage &Sin,
const double &low=0,
const double &high=1,
const unsigned int &seed=std::random_device()());
65 void Make_normal(
Tensor &Tin,
const double &mean,
const double &std,
const unsigned int &seed=std::random_device()());
82 void Make_uniform(
Tensor &Tin,
const double &low=0,
const double &high=1,
const unsigned int &seed=std::random_device()());
114 Tensor normal(
const std::vector<cytnx_uint64> &Nelem,
const double &mean,
const double &std,
const int &device=
Device.cpu,
const unsigned int &seed=std::random_device()());
145 Tensor uniform(
const std::vector<cytnx_uint64> &Nelem,
const double &low,
const double &high,
const int &device=
Device.cpu,
const unsigned int &seed=std::random_device()());
an memeory storage with multi-type/multi-device support
Definition Storage.hpp:918
an tensor (multi-dimensional array)
Definition Tensor.hpp:289
Tensor normal(const cytnx_uint64 &Nelem, const double &mean, const double &std, const int &device=Device.cpu, const unsigned int &seed=std::random_device()())
create an Tensor with all the elements are initialized with normal distribution
Tensor uniform(const cytnx_uint64 &Nelem, const double &low, const double &high, const int &device=Device.cpu, const unsigned int &seed=std::random_device()())
create an Tensor with all the elements are initialized with uniform distribution
void Make_uniform(Storage &Sin, const double &low=0, const double &high=1, const unsigned int &seed=std::random_device()())
Randomize the memory of a Storage with uniform distributon.
void Make_normal(Storage &Sin, const double &mean, const double &std, const unsigned int &seed=std::random_device()())
Randomize the memory of a Storage with normal distributon.
Definition Accessor.hpp:12
Device_class Device
Definition Device.cpp:105
uint64_t cytnx_uint64
Definition Type.hpp:22