ViennaCL - The Vienna Computing Library  1.7.0
Free open-source GPU-accelerated linear algebra and solver library.
forwards.h
Go to the documentation of this file.
1 #ifndef VIENNACL_OCL_FORWARDS_H_
2 #define VIENNACL_OCL_FORWARDS_H_
3 
4 /* =========================================================================
5  Copyright (c) 2010-2015, Institute for Microelectronics,
6  Institute for Analysis and Scientific Computing,
7  TU Wien.
8  Portions of this software are copyright by UChicago Argonne, LLC.
9 
10  -----------------
11  ViennaCL - The Vienna Computing Library
12  -----------------
13 
14  Project Head: Karl Rupp rupp@iue.tuwien.ac.at
15 
16  (A list of authors and contributors can be found in the manual)
17 
18  License: MIT (X11), see file LICENSE in the base directory
19 ============================================================================= */
20 
25 #define VIENNACL_OCL_MAX_DEVICE_NUM 8
26 
27 #include <stddef.h>
28 
29 namespace viennacl
30 {
31  namespace ocl
32  {
33  //device type tags (cf. OpenCL standard)
35  struct gpu_tag {};
37  struct cpu_tag {};
39  struct accelerator_tag {};
41  struct default_tag {};
42 
43 
44  class kernel;
45  class device;
46  class command_queue;
47  class context;
48  class program;
49 
50  template<class OCL_TYPE>
51  class handle;
52 
53  template<typename KernelType>
54  void enqueue(KernelType & k, viennacl::ocl::command_queue const & queue);
55 
57  inline viennacl::ocl::device const & current_device();
58  }
59 } //namespace viennacl
60 
61 #endif
62 
A tag identifying OpenCL devices as GPUs.
Definition: forwards.h:35
Represents an OpenCL kernel within ViennaCL.
Definition: kernel.hpp:58
viennacl::ocl::context & current_context()
Convenience function for returning the current context.
Definition: backend.hpp:213
Manages an OpenCL context and provides the respective convenience functions for creating buffers...
Definition: context.hpp:55
A tag identifying OpenCL devices as CPUs.
Definition: forwards.h:37
A class representing a compute device (e.g. a GPU)
Definition: device.hpp:49
A class representing a command queue.
viennacl::ocl::device const & current_device()
Convenience function for returning the active device in the current context.
Definition: backend.hpp:351
Main namespace in ViennaCL. Holds all the basic types such as vector, matrix, etc. and defines operations upon them.
Definition: cpu_ram.hpp:34
A tag identifying OpenCL devices as accelerators (e.g. Intel Xeon Phi)
Definition: forwards.h:39
Wrapper class for an OpenCL program.
Definition: program.hpp:42
void enqueue(KernelType &k, viennacl::ocl::command_queue const &queue)
Enqueues a kernel in the provided queue.
Definition: enqueue.hpp:50
A tag denoting the default OpenCL device type (SDK-specific)
Definition: forwards.h:41
Handle class the effectively represents a smart pointer for OpenCL handles.
Definition: forwards.h:51