397ae85c876ea4203e7272ca4b7d044fa3a4c6f6
[platform/upstream/dldt.git] / inference-engine / thirdparty / clDNN / src / gpu / command_queues_builder.h
1 /*
2 // Copyright (c) 2018 Intel Corporation
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //      http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 */
16
17 ///////////////////////////////////////////////////////////////////////////////////////////////////
18 #pragma once
19 #include "ocl_toolkit.h"
20
21 namespace cldnn {
22 namespace gpu {
23 class command_queues_builder {
24 public:
25     command_queues_builder(const cl::Context& context, const cl::Device& device, const cl_platform_id& platform_id);
26     void build();
27     void set_throttle_mode(throttle_mode_types throttle, bool extension_support);
28     void set_priority_mode(priority_mode_types priority, bool extension_support);
29     void set_profiling(bool flag) { _profiling = flag; }
30     void set_out_of_order(bool flag) { _out_of_order = flag; }
31     cl::CommandQueue& queue() { return _queue; }
32     cl::CommandQueue queue() const { return _queue; }
33
34 private:
35     cl::CommandQueue _queue;
36     cl::Context _context;
37     cl::Device _device;
38     cl_platform_id _platform_id;
39     bool _profiling;
40     bool _out_of_order;
41     priority_mode_types _priority_mode;
42     throttle_mode_types _throttle_mode;
43
44     cl_command_queue_properties get_properties();
45 };
46 }  // namespace gpu
47 }  // namespace cldnn