Implementations of the OpenCL backend, where all contexts are stored in. More...
#include <vector>
#include "viennacl/ocl/context.hpp"
#include "viennacl/ocl/enqueue.hpp"
Go to the source code of this file.
Data Structures | |
class | backend< dummy > |
A backend that provides contexts for ViennaCL objects (vector, matrix, etc.). More... | |
Namespaces | |
namespace | viennacl |
namespace | viennacl::ocl |
Functions | |
viennacl::ocl::context & | current_context () |
Convenience function for returning the current context. | |
void | switch_context (long i) |
Convenience function for switching the current context. | |
void | setup_context (long i, std::vector< cl_device_id > const &devices) |
Convenience function for setting devices for a context. | |
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) |
Convenience function for setting up a context in ViennaCL from an existing OpenCL context. | |
void | setup_context (long i, cl_context c, std::vector< cl_device_id > const &devices, std::vector< cl_command_queue > const &queues) |
Convenience function for setting up a context in ViennaCL from an existing OpenCL context. | |
void | setup_context (long i, cl_context c, cl_device_id d, cl_command_queue q) |
Convenience function for setting up a context in ViennaCL from an existing OpenCL context. | |
void | set_context_device_type (long i, cl_device_type dev_type) |
Convenience function for setting the default device type for a context. | |
void | set_context_device_type (long i, viennacl::ocl::gpu_tag) |
Convenience function for setting the default device type for a context to GPUs. | |
void | set_context_device_type (long i, viennacl::ocl::cpu_tag) |
Convenience function for setting the default device type for a context to CPUs. | |
void | set_context_device_type (long i, viennacl::ocl::default_tag) |
Convenience function for setting the default device type for a context to the default OpenCL device type. | |
void | set_context_device_type (long i, viennacl::ocl::accelerator_tag) |
Convenience function for setting the default device type for a context to accelerators. | |
viennacl::ocl::command_queue & | get_queue () |
Convenience function for getting the default queue for the currently active device in the active context. | |
viennacl::ocl::command_queue & | get_queue (viennacl::ocl::device d, unsigned int queue_id=0) |
Convenience function for getting the queue for a particular device in the current active context. | |
viennacl::ocl::command_queue & | get_queue (cl_device_id dev_id, unsigned int queue_id=0) |
Convenience function for getting the queue for a particular device in the current active context. | |
viennacl::ocl::kernel & | get_kernel (std::string const &prog_name, std::string const &kernel_name) |
Convenience function for getting the kernel for a particular program from the current active context. | |
void | switch_device (viennacl::ocl::device &d) |
Convenience function for switching the active device in the current context. | |
viennacl::ocl::device const & | current_device () |
Convenience function for returning the active device in the current context. |
Implementations of the OpenCL backend, where all contexts are stored in.