ViennaCL - The Vienna Computing Library  1.5.2
Data Structures | Namespaces | Functions
backend.hpp File Reference

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

 viennacl
 Main namespace in ViennaCL. Holds all the basic types such as vector, matrix, etc. and defines operations upon them.
 
 viennacl::ocl
 OpenCL backend. Manages platforms, contexts, buffers, kernels, etc.
 

Functions

viennacl::ocl::contextcurrent_context ()
 Convenience function for returning the current context. More...
 
void switch_context (long i)
 Convenience function for switching the current context. More...
 
viennacl::ocl::contextget_context (long i)
 Convenience function for returning the current context. More...
 
void setup_context (long i, std::vector< cl_device_id > const &devices)
 Convenience function for setting devices for a context. More...
 
void setup_context (long i, viennacl::ocl::device const &device)
 Convenience function for setting devices for a context. More...
 
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. More...
 
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. More...
 
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. More...
 
void set_context_device_type (long i, cl_device_type dev_type)
 Convenience function for setting the default device type for a context. More...
 
void set_context_device_type (long i, viennacl::ocl::gpu_tag)
 Convenience function for setting the default device type for a context to GPUs. More...
 
void set_context_device_type (long i, viennacl::ocl::cpu_tag)
 Convenience function for setting the default device type for a context to CPUs. More...
 
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. More...
 
void set_context_device_type (long i, viennacl::ocl::accelerator_tag)
 Convenience function for setting the default device type for a context to accelerators. More...
 
void set_context_device_num (long i, vcl_size_t num)
 Convenience function for setting the number of default devices per context. More...
 
void set_context_platform_index (long i, vcl_size_t pf_index)
 Convenience function for setting the platform index. More...
 
viennacl::ocl::command_queueget_queue ()
 Convenience function for getting the default queue for the currently active device in the active context. More...
 
viennacl::ocl::command_queueget_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. More...
 
viennacl::ocl::command_queueget_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. More...
 
viennacl::ocl::kernelget_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. More...
 
void switch_device (viennacl::ocl::device &d)
 Convenience function for switching the active device in the current context. More...
 
viennacl::ocl::device const & current_device ()
 Convenience function for returning the active device in the current context. More...
 

Detailed Description

Implementations of the OpenCL backend, where all contexts are stored in.