ViennaCL - The Vienna Computing Library
1.2.0
Main Page
Namespaces
Data Structures
Files
File List
Globals
viennacl
ocl
command_queue.hpp
Go to the documentation of this file.
1
#ifndef VIENNACL_OCL_COMMAND_QUEUE_HPP_
2
#define VIENNACL_OCL_COMMAND_QUEUE_HPP_
3
4
/* =========================================================================
5
Copyright (c) 2010-2011, Institute for Microelectronics,
6
Institute for Analysis and Scientific Computing,
7
TU Wien.
8
9
-----------------
10
ViennaCL - The Vienna Computing Library
11
-----------------
12
13
Project Head: Karl Rupp rupp@iue.tuwien.ac.at
14
15
(A list of authors and contributors can be found in the PDF manual)
16
17
License: MIT (X11), see file LICENSE in the base directory
18
============================================================================= */
19
24
#ifdef __APPLE__
25
#include <OpenCL/cl.h>
26
#else
27
#include <CL/cl.h>
28
#endif
29
30
#include <vector>
31
#include <string>
32
#include <sstream>
33
#include "
viennacl/ocl/context.hpp
"
34
#include "
viennacl/ocl/device.hpp
"
35
#include "
viennacl/ocl/handle.hpp
"
36
37
namespace
viennacl
38
{
39
namespace
ocl
40
{
41
45
class
command_queue
46
{
47
public
:
48
command_queue
() {};
49
command_queue
(
viennacl::ocl::handle<cl_command_queue>
h, cl_device_id dev) : handle_(h) {}
50
51
//Copy constructor:
52
command_queue
(
command_queue
const
& other)
53
{
54
handle_ = other.handle_;
55
}
56
57
//assignment operator:
58
command_queue
&
operator=
(
command_queue
const
& other)
59
{
60
handle_ = other.handle_;
61
return
*
this
;
62
}
63
65
void
finish
()
const
66
{
67
clFinish(handle_);
68
}
69
71
void
flush
()
const
72
{
73
clFlush(handle_);
74
}
75
76
viennacl::ocl::handle<cl_command_queue>
const
&
handle
()
const
{
return
handle_; }
77
78
private
:
79
80
viennacl::ocl::handle<cl_command_queue>
handle_;
81
};
82
83
84
85
}
//namespace ocl
86
}
//namespace viennacl
87
88
#endif
Generated on Fri Jul 27 2012 22:02:52 for ViennaCL - The Vienna Computing Library by
1.8.1.2