#include <oclutils.h>
List of all members.
Public Member Functions |
| | OpenCL_Array () |
| | Default constructor.
|
| void | Initialize (int _N, const size_t _sizeof_element, T *&host_array, const cl_context &_context, cl_mem_flags flags, std::string _platform, const cl_command_queue &_command_queue, const cl_device_id &_device, const bool _checksum_array) |
| | Inititalizes the array object.
|
| void | Release_Memory () |
| | Releases device memory allocated.
|
| void | Host_to_Device () |
| | Copies data from the host array to the device array.
|
| void | Device_to_Host () |
| | Copies data from the device array to the host array.
|
| std::string | Host_Checksum () |
| std::string | Device_Checksum () |
| void | Validate_Data () |
| cl_mem * | Get_Device_Array () |
| | Obtains the device array OpenCL memory pointer.
|
| T * | Get_Host_Pointer () |
| | Obtains the host array memory pointer.
|
| void | Set_as_Kernel_Argument (cl_kernel &kernel, const int order) |
| | Sets the device array as a certain kernel argument.
|
template<class T>
class OpenCL_Array< T >
Constructor & Destructor Documentation
Member Function Documentation
Copies data from the device array to the host array.
Obtains the device array OpenCL memory pointer.
- Returns:
- OpenCL memory pointer.
Obtains the host array memory pointer.
- Returns:
- memory pointer.
Copies data from the host array to the device array.
template<class T>
| void OpenCL_Array< T >::Initialize |
( |
int |
_N, |
|
|
const size_t |
_sizeof_element, |
|
|
T *& |
_host_array, |
|
|
const cl_context & |
_context, |
|
|
cl_mem_flags |
flags, |
|
|
std::string |
_platform, |
|
|
const cl_command_queue & |
_command_queue, |
|
|
const cl_device_id & |
_device, |
|
|
const bool |
_checksum_array |
|
) |
| |
Inititalizes the array object.
- Parameters:
-
| _N | number of elements in the array. |
| _sizeof_element | byte size of the elements of the array. |
| _context | OpenCL context in which the array will be allocated. |
| flags | OpenCL flags of the device array. |
| _platform | platform name. |
| _command_queue | OpenCL command queue in which the array will be allocated. |
| _device | OpenCL device id in which the array will be allocated. |
Releases device memory allocated.
Sets the device array as a certain kernel argument.
- Parameters:
-
| kernel | OpenCL kernel in which the array will be set as an argument. |
| order | number that denotes the position of the argument. |
The documentation for this class was generated from the following files: