Class return_data_t#
Defined in File returndata.cuh
Class Documentation#
-
class return_data_t#
The return data class. (YP: \(H_{return}(\mu)=H(\mu, I)\))
Public Functions
- inline __host__ __device__ __forceinline__ return_data_t (data_content_t *content)
The constructor with the given content
- Parameters
content – [in] the content of the return data
- inline __host__ __device__ __forceinline__ return_data_t ()
The cosntrctuor without the content
- inline __host__ __device__ __forceinline__ ~return_data_t ()
The destructor
- inline __host__ __device__ __forceinline__ size_t size ()
Get the size of the return data
- Returns
the size of the return data
- inline __host__ __device__ __forceinline__ uint8_t * get (size_t index, size_t size, uint32_t &error_code)
Get the content of the return data
- Parameters
index – [in] the index of in the return data
size – [in] the size of the content
error_code – [out] the error code
- Returns
the pointer in the return data
- inline __host__ __device__ __forceinline__ data_content_t * get_data ()
Get the content of the return data
- Returns
the pointer in the return data
- inline __host__ __device__ __forceinline__ void set (uint8_t *data, size_t size)
Set the content of the return data
- Parameters
data – [in] the data to be set
size – [in] the size of the data
- inline __host__ __device__ __forceinline__ void to_data_content_t (data_content_t &data_content)
- inline __host__ __device__ void print ()
Print the return data
- inline __host__ cJSON * json ()
Get the json representation of the return data
- Returns
the json representation of the return data
Public Members
-
data_content_t *_content#
The content of the return data
Public Static Functions
- static inline __host__ data_content_t * get_cpu_instances (uint32_t count)
Get the cpu instances for the return data
- Parameters
count – [in] the number of instances
- Returns
the cpu instances
- static inline __host__ void free_cpu_instances (data_content_t *cpu_instances, uint32_t count)
Free the cpu instances
- Parameters
cpu_instances – [in] the cpu instances
count – [in] the number of instances
- static inline __host__ data_content_t * get_gpu_instances_from_cpu_instances (data_content_t *cpu_instances, uint32_t count)
Get the gpu instances for the return data from the cpu instances
- Parameters
cpu_instances – [in] the cpu instances
count – [in] the number of instances
- Returns
the gpu instances
- static inline __host__ void free_gpu_instances (data_content_t *gpu_instances, uint32_t count)
Free the gpu instances
- Parameters
gpu_instances – [in] the gpu instances
count – [in] the number of instances
- static inline __host__ data_content_t * get_cpu_instances_from_gpu_instances (data_content_t *gpu_instances, uint32_t count)
Get the cpu instances from the gpu instances
- Parameters
gpu_instances – [in] the gpu instances
count – [in] the number of instances
- Returns
the cpu instances