HPXCL
 All Classes Functions
Public Member Functions | Static Public Member Functions
hpx::cuda::device Class Reference

List of all members.

Public Member Functions

 device (hpx::naming::id_type const &there, int dev)
 device (hpx::future< hpx::naming::id_type > &&gid)
void get_cuda_info ()
 Method prints the properties of this device.
void get_extended_cuda_info ()
 Method prints the extended properties of this device.
hpx::lcos::future< int > get_device_architecture_major ()
 methods return the major compute capability of this device
hpx::lcos::future< int > get_device_architecture_minor ()
 methods return the minor compute capability of this device
void set_device (int dev)
hpx::lcos::future< int > get_device_id ()
int get_device_id_sync ()
hpx::lcos::future< int > get_context ()
int get_context_sync ()
hpx::lcos::future< int > wait ()
hpx::cuda::program create_program_with_source_sync (std::string source)
 Creates synchronous a program with the set source code.
hpx::lcos::future
< hpx::cuda::program
create_program_with_source (std::string source)
 Creates a program with the set source code.
hpx::lcos::future
< hpx::cuda::program
create_program_with_file (std::string file)
 Creates a program from the given source file.
hpx::lcos::future
< hpx::cuda::buffer
create_buffer (size_t size)
 Creates a buffer attached to this device.
hpx::cuda::buffer create_buffer_sync (size_t size)
 Synchronous creation of the buffer.

Static Public Member Functions

static std::vector< int > get_all_devices (std::vector< hpx::naming::id_type > localities)
 Method returns all other devices on the locality of this device.

Detailed Description

Examples:
build_kernel.cpp, build_kernel_from_file.cpp, and streams.cpp.

Member Function Documentation

hpx::lcos::future<hpx::cuda::buffer> hpx::cuda::device::create_buffer ( size_t  size) [inline]

Creates a buffer attached to this device.

The method creates a buffer with the size specified here and allocates this on this device.

Parameters:
sizeThe size of the allocated buffer
Returns:
The buffer with the allocated memoery on this device
hpx::lcos::future<hpx::cuda::program> hpx::cuda::device::create_program_with_file ( std::string  file) [inline]

Creates a program from the given source file.

This Method creates a program containing the source code. This program is attached to this device and all streams are executed there.

Parameters:
sourceThe path to the source file
See also:
Program
Examples:
build_kernel_from_file.cpp.
hpx::lcos::future<hpx::cuda::program> hpx::cuda::device::create_program_with_source ( std::string  source) [inline]

Creates a program with the set source code.

This Method creates a program containing the source code. This program is attached to this device and all streams are executed there.

Parameters:
sourceThe source code of the CUDA kernel
See also:
Program
Examples:
build_kernel.cpp, and streams.cpp.
static std::vector<int> hpx::cuda::device::get_all_devices ( std::vector< hpx::naming::id_type >  localities) [inline, static]

Method returns all other devices on the locality of this device.

Returns:
A list of suitable CUDA devices on target node
hpx::lcos::future<int> hpx::cuda::device::get_device_architecture_major ( ) [inline]

methods return the major compute capability of this device

Returns:
Major compute capability of this device
Examples:
build_kernel.cpp, build_kernel_from_file.cpp, and streams.cpp.
hpx::lcos::future<int> hpx::cuda::device::get_device_architecture_minor ( ) [inline]

methods return the minor compute capability of this device

Returns:
Minor compute capability of this device
Examples:
build_kernel.cpp, build_kernel_from_file.cpp, and streams.cpp.

Method prints the extended properties of this device.

Note:
All information of the cudaDeviceproperties are shown.

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