1 /* 2 * Copyright 2017 Google Inc. 3 * 4 * Use of this source code is governed by a BSD-style license that can 5 * be found in the LICENSE file. 6 * 7 */ 8 9 #pragma once 10 11 #include "types.h" 12 13 // 14 // Why we need to wrap command queue creation: 15 // 16 // - command queue creation is expensive 17 // 18 // - the CL 1.2 function is deprecated in 2.0 19 // 20 21 struct skc_cq_pool 22 { 23 cl_command_queue * cq; 24 cl_command_queue_properties cq_props; 25 26 skc_uint size; 27 skc_uint reads; 28 skc_uint writes; 29 }; 30 31 //l 32 // 33 // 34 35 void 36 skc_cq_pool_create(struct skc_runtime * const runtime, 37 struct skc_cq_pool * const pool, 38 cl_command_queue_properties const cq_props, 39 skc_uint const size); 40 41 void 42 skc_cq_pool_dispose(struct skc_runtime * const runtime, 43 struct skc_cq_pool * pool); 44 45 // 46 // 47 // 48