A backend that provides contexts for ViennaCL objects (vector, matrix, etc.).
More...
#include <backend.hpp>
Static Public Member Functions |
| static void | switch_context (long i) |
| | Switches the current context to the context identified by i.
|
| static viennacl::ocl::context & | current_context () |
| | Returns the current active context.
|
static
viennacl::ocl::command_queue & | get_queue () |
| | Returns the current queue for the active device in the active context.
|
| static void | setup_context (long i, std::vector< cl_device_id > const &devices) |
| | Sets a number of devices for the context.
|
| static void | setup_context (long i, cl_context c, std::vector< cl_device_id > const &devices, std::map< cl_device_id, std::vector< cl_command_queue > > const &queues) |
| | Initializes ViennaCL with an already existing context.
|
| static void | setup_context (long i, cl_context c, std::vector< cl_device_id > const &devices, std::vector< cl_command_queue > const &queue) |
| | Initializes ViennaCL with an already existing context.
|
| static void | set_context_device_type (long i, cl_device_type t) |
| | Sets the context device type.
|
Detailed Description
template<bool dummy = false>
class viennacl::ocl::backend< dummy >
A backend that provides contexts for ViennaCL objects (vector, matrix, etc.).
Member Function Documentation
Returns the current active context.
Returns the current queue for the active device in the active context.
| static void set_context_device_type |
( |
long |
i, |
|
|
cl_device_type |
t | |
|
) |
| | [inline, static] |
Sets the context device type.
| static void setup_context |
( |
long |
i, |
|
|
cl_context |
c, |
|
|
std::vector< cl_device_id > const & |
devices, |
|
|
std::map< cl_device_id, std::vector< cl_command_queue > > const & |
queues | |
|
) |
| | [inline, static] |
Initializes ViennaCL with an already existing context.
- Parameters:
-
| i | ID of the context to be set up |
| c | The OpenCL handle of the existing context |
| devices | A vector of OpenCL device-IDs that should be added to the context |
| queues | A map of queues for each device |
| static void setup_context |
( |
long |
i, |
|
|
std::vector< cl_device_id > const & |
devices | |
|
) |
| | [inline, static] |
Sets a number of devices for the context.
- Parameters:
-
| i | ID of the context to be set up |
| devices | A vector of OpenCL device-IDs that should be added to the context |
| static void setup_context |
( |
long |
i, |
|
|
cl_context |
c, |
|
|
std::vector< cl_device_id > const & |
devices, |
|
|
std::vector< cl_command_queue > const & |
queue | |
|
) |
| | [inline, static] |
Initializes ViennaCL with an already existing context.
- Parameters:
-
| i | ID of the context to be set up |
| c | The OpenCL handle of the existing context |
| devices | A vector of OpenCL device-IDs that should be added to the context |
| queue | One queue per device |
| static void switch_context |
( |
long |
i |
) |
[inline, static] |
Switches the current context to the context identified by i.
- Parameters:
-
| i | ID of the new active context |
The documentation for this class was generated from the following file:
- /data/development/ViennaCL/ViennaCL-1.1.2/viennacl/ocl/backend.hpp