• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2016 Google Inc.
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  *
7  */
8 
9 #pragma once
10 
11 //
12 //
13 //
14 
15 #include <CL/opencl.h>
16 #include <stdbool.h>
17 
18 //
19 //
20 //
21 
22 char const *
23 cl_get_error_string(cl_int const err);
24 
25 cl_int
26 assert_cl(cl_int       const code,
27           char const * const file,
28           int          const line,
29           bool         const abort);
30 
31 //
32 //
33 //
34 
35 #define cl(...)    assert_cl((cl##__VA_ARGS__), __FILE__, __LINE__, true);
36 #define cl_ok(err) assert_cl(err,               __FILE__, __LINE__, true);
37 
38 //
39 //
40 //
41 
42 void
43 cl_get_event_info(cl_event                event,
44                   cl_int          * const status,
45                   cl_command_type * const type);
46 
47 char const *
48 cl_get_event_command_status_string(cl_int const status);
49 
50 char const *
51 cl_get_event_command_type_string(cl_command_type const type);
52 
53 //
54 //
55 //
56