GCVL
Multi-platform (Windows, Unix and Mac OS) C++/OpenCL/CUDA library with several Computer Vision algorithms.
OpenCL_Array< T > Class Template Reference

#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

template<class T >
OpenCL_Array< T >::OpenCL_Array ( )

Default constructor.


Member Function Documentation

template<class T>
std::string OpenCL_Array< T >::Device_Checksum ( )
template<class T >
void OpenCL_Array< T >::Device_to_Host ( )

Copies data from the device array to the host array.

template<class T>
cl_mem* OpenCL_Array< T >::Get_Device_Array ( ) [inline]

Obtains the device array OpenCL memory pointer.

Returns:
OpenCL memory pointer.
template<class T>
T* OpenCL_Array< T >::Get_Host_Pointer ( ) [inline]

Obtains the host array memory pointer.

Returns:
memory pointer.
template<class T>
std::string OpenCL_Array< T >::Host_Checksum ( )
template<class T >
void OpenCL_Array< T >::Host_to_Device ( )

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:
_Nnumber of elements in the array.
_sizeof_elementbyte size of the elements of the array.
_contextOpenCL context in which the array will be allocated.
flagsOpenCL flags of the device array.
_platformplatform name.
_command_queueOpenCL command queue in which the array will be allocated.
_deviceOpenCL device id in which the array will be allocated.
template<class T >
void OpenCL_Array< T >::Release_Memory ( )

Releases device memory allocated.

template<class T >
void OpenCL_Array< T >::Set_as_Kernel_Argument ( cl_kernel &  kernel,
const int  order 
)

Sets the device array as a certain kernel argument.

Parameters:
kernelOpenCL kernel in which the array will be set as an argument.
ordernumber that denotes the position of the argument.
template<class T>
void OpenCL_Array< T >::Validate_Data ( )

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Defines