5 #ifndef THUNDERSVM_SYNCDATA_H 6 #define THUNDERSVM_SYNCDATA_H 8 #include "thundersvm.h" 28 const T *host_data()
const;
30 const T *device_data()
const;
36 void set_host_data(T *host_ptr){
40 void set_device_data(T *device_ptr){
48 void to_device()
const{
71 void copy_from(
const T *source,
size_t count);
87 size_t mem_size()
const {
95 SyncMem::HEAD head()
const{
99 void log(el::base::type::ostream_t &ostream)
const override;
110 #endif //THUNDERSVM_SYNCDATA_H void set_device_data(void *data)
Definition: syncmem.cpp:114
void resize(size_t count)
Definition: syncarray.cpp:42
size_t size() const
return the size of memory
Definition: syncmem.cpp:46
void to_device()
transfer data to device
Definition: syncmem.cpp:79
void set_host_data(void *data)
Definition: syncmem.cpp:104
void to_host()
transfer data to host
Definition: syncmem.cpp:54
void copy_from(const T *source, size_t count)
Definition: syncarray.cpp:49
Wrapper of SyncMem with a type.
Definition: syncarray.h:16
void mem_set(const T &value)
Definition: syncarray.cpp:80
Auto-synced memory for CPU and GPU.
Definition: syncmem.h:38