3#include "lamppp/tensor/data_ptr.hpp"
4#include "lamppp/tensor/device_type.hpp"
5#include "lamppp/tensor/dispatch_stub.hpp"
6#include "lamppp/tensor/scalar.hpp"
14using copy_fn = void (*)(DeviceType,
const void*,
void*, size_t, DataType,
16using empty_fn = detail::DataPtr (*)(size_t);
17using fill_fn = void (*)(
void*, size_t, Scalar, DataType type);
18using resize_fn = void (*)(detail::DataPtr, size_t, size_t);
20LMP_DECLARE_DISPATCH(copy_fn, copy_stub);
21LMP_DECLARE_DISPATCH(empty_fn, empty_stub);
22LMP_DECLARE_DISPATCH(fill_fn, fill_stub);
23LMP_DECLARE_DISPATCH(resize_fn, resize_stub);
33Tensor to(
const Tensor& a, DeviceType to_device);