Publishing 2019 R1 content
[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 { namespace gpu {
22     class command_queues_builder
23     {
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(cldnn_throttle_mode_type throttle, bool extension_support);
28         void set_priority_mode(cldnn_priority_mode_type 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         cldnn_priority_mode_type _priority_mode;
42         cldnn_throttle_mode_type _throttle_mode;
43
44         cl_command_queue_properties get_properties();
45     };
46 }}