Wrapper of SyncMem with a type.
More...
#include <syncarray.h>
|
| SyncArray (size_t count) |
|
const T * | host_data () const |
|
const T * | device_data () const |
|
T * | host_data () |
|
T * | device_data () |
|
void | set_host_data (T *host_ptr) |
|
void | set_device_data (T *device_ptr) |
|
void | to_host () const |
|
void | to_device () const |
|
void | copy_from (const T *source, size_t count) |
|
void | copy_from (const SyncArray< T > &source) |
|
void | mem_set (const T &value) |
|
void | resize (size_t count) |
|
size_t | mem_size () const |
|
size_t | size () const |
|
SyncMem::HEAD | head () const |
|
void | log (el::base::type::ostream_t &ostream) const override |
|
template<typename T>
class SyncArray< T >
Wrapper of SyncMem with a type.
- Template Parameters
-
◆ SyncArray()
initialize class that can store given count of elements
- Parameters
-
◆ copy_from()
template<typename T>
void SyncArray< T >::copy_from |
( |
const T * |
source, |
|
|
size_t |
count |
|
) |
| |
random access operator
- Parameters
-
index | the index of the elements |
- Returns
- host element at the index copy device data. This will call to_device() implicitly.
- Parameters
-
source | source device data pointer |
count | the count of elements |
◆ mem_set()
template<typename T>
void SyncArray< T >::mem_set |
( |
const T & |
value | ) |
|
set all elements to the given value. This method will set device data.
- Parameters
-
◆ resize()
resize to a new size. This will also clear all data.
- Parameters
-
The documentation for this class was generated from the following files:
- include/thundersvm/syncarray.h
- src/thundersvm/syncarray.cpp