Cyclops Tensor Framework
parallel arithmetic on multidimensional arrays
CTF_int::offload_arr Class Reference

offloaded array/buffer More...

#include <offload.h>

Inheritance diagram for CTF_int::offload_arr:

Public Member Functions

 offload_arr (int64_t nbytes)
 constructor allocates device buffer More...
 
 ~offload_arr ()
 destructor allocates device buffer More...
 
void download (char *host_spr)
 read data from device to host pointer More...
 
void upload (char const *host_spr)
 write data from host to device More...
 

Data Fields

char * dev_spr
 device pointer More...
 
int64_t nbytes
 number of bytes More...
 

Detailed Description

offloaded array/buffer

Definition at line 23 of file offload.h.

Constructor & Destructor Documentation

CTF_int::offload_arr::offload_arr ( int64_t  nbytes)

constructor allocates device buffer

Parameters
[in]nbytesnumber of elements
CTF_int::offload_arr::~offload_arr ( )

destructor allocates device buffer

Member Function Documentation

void CTF_int::offload_arr::download ( char *  host_spr)

read data from device to host pointer

Parameters
[in,out]host_spr(should be preallocated)
void CTF_int::offload_arr::upload ( char const *  host_spr)

write data from host to device

Parameters
[in]host_spr

Field Documentation

char* CTF_int::offload_arr::dev_spr

device pointer

Definition at line 26 of file offload.h.

int64_t CTF_int::offload_arr::nbytes

number of bytes

Definition at line 28 of file offload.h.

Referenced by ctf.core.tensor::__get__().


The documentation for this class was generated from the following file: