HPXCL
 All Classes Functions
Public Member Functions
hpx::cuda::buffer Class Reference

List of all members.

Public Member Functions

 buffer (hpx::future< hpx::naming::id_type > &&gid)
hpx::lcos::future< size_t > size ()
 Method returns the buffer's size.
size_t size_sync ()
hpx::lcos::future< void > set_size (size_t size)
 Method sets the buffer's size.
void set_size_sync (size_t size)
template<typename T >
T * enqueue_read_sync (size_t offset, size_t size)
 Method copy synchronized the data on the attached device to the host.
hpx::future
< hpx::serialization::serialize_buffer
< char > > 
enqueue_read (size_t offset, size_t size)
 Method copy the data on the attached device to the host.
hpx::future< uintptr_t > enqueue_read_local (size_t offset, size_t size)
 Method copy the data on the attached device to the host.
hpx::future< void > enqueue_write (size_t offset, size_t size, const void *data) const
 Method copies the provided data on the attached device memory.

Detailed Description

Examples:
build_kernel.cpp, and build_kernel_from_file.cpp.

Member Function Documentation

hpx::future<hpx::serialization::serialize_buffer<char> > hpx::cuda::buffer::enqueue_read ( size_t  offset,
size_t  size 
) [inline]

Method copy the data on the attached device to the host.

Parameters:
offsetOffset, where to start copying data
sizeSize of the data on the device
Returns:
A future with the serialized data
Note:
This method is for accessing data on remote localities.
hpx::future<uintptr_t> hpx::cuda::buffer::enqueue_read_local ( size_t  offset,
size_t  size 
) [inline]

Method copy the data on the attached device to the host.

Parameters:
offsetOffset, where to start copying data
sizeSize of the data on the device
Returns:
A future with the uintptr_t to the data
Note:
This method is for accessing data on local localities.
template<typename T >
T* hpx::cuda::buffer::enqueue_read_sync ( size_t  offset,
size_t  size 
) [inline]

Method copy synchronized the data on the attached device to the host.

Parameters:
offsetOffset, where to start copying data
sizeSize of the data on the device
Returns:
Pointer to the data on the host
Examples:
build_kernel.cpp, and build_kernel_from_file.cpp.
hpx::future<void> hpx::cuda::buffer::enqueue_write ( size_t  offset,
size_t  size,
const void *  data 
) const [inline]

Method copies the provided data on the attached device memory.

Parameters:
offsetOffset, where to start copying data
sizeSize of the data on the device
dataPointer to the data, which is transfered to the device
Examples:
build_kernel.cpp, and build_kernel_from_file.cpp.
hpx::lcos::future<void> hpx::cuda::buffer::set_size ( size_t  size) [inline]

Method sets the buffer's size.

Parameters:
sizeThe size of the buffer
Note:
Use this methods carefully for extending a buffer. Adaptive buffer on GPU are mostly performing bad.
hpx::lcos::future<size_t> hpx::cuda::buffer::size ( ) [inline]

Method returns the buffer's size.

Returns:
The buffer size

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