File: _kernel_constants.h

package info (click to toggle)
pocl 6.0-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 25,320 kB
  • sloc: lisp: 149,513; ansic: 103,778; cpp: 54,947; python: 1,513; sh: 949; ruby: 255; pascal: 226; tcl: 180; makefile: 175; java: 72; xml: 49
file content (93 lines) | stat: -rw-r--r-- 4,336 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/* pocl/_kernel_constants.h - C compatible OpenCL types and runtime library
   constants declarations.

   Copyright (c) 2011 Universidad Rey Juan Carlos
   Copyright (c) 2011-2013 Pekka Jääskeläinen / TUT
   Copyright (c) 2011-2013 Erik Schnetter <eschnetter@perimeterinstitute.ca>
                           Perimeter Institute for Theoretical Physics
   
   Permission is hereby granted, free of charge, to any person obtaining a copy
   of this software and associated documentation files (the "Software"), to deal
   in the Software without restriction, including without limitation the rights
   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
   copies of the Software, and to permit persons to whom the Software is
   furnished to do so, subject to the following conditions:
   
   The above copyright notice and this permission notice shall be included in
   all copies or substantial portions of the Software.
   
   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
   THE SOFTWARE.
*/
/**
 * Header that can be implemented in C compiled implementations of
 * built-in functions to introduce the OpenCL C compatible constants.
 */
#ifndef _KERNEL_CONSTANTS_H
#define _KERNEL_CONSTANTS_H

/* clang's header defines these */
#ifndef _OPENCL_H_

/* cl_channel_order */
#define CLK_R                                        0x10B0
#define CLK_A                                        0x10B1
#define CLK_RG                                       0x10B2
#define CLK_RA                                       0x10B3
#define CLK_RGB                                      0x10B4
#define CLK_RGBA                                     0x10B5
#define CLK_BGRA                                     0x10B6
#define CLK_ARGB                                     0x10B7
#define CLK_INTENSITY                                0x10B8
#define CLK_LUMINANCE                                0x10B9
#define CLK_Rx                                       0x10BA
#define CLK_RGx                                      0x10BB
#define CLK_RGBx                                     0x10BC
#define CLK_DEPTH                                    0x10BD
#define CLK_DEPTH_STENCIL                            0x10BE

/* cl_channel_type */
#define CLK_SNORM_INT8                               0x10D0
#define CLK_SNORM_INT16                              0x10D1
#define CLK_UNORM_INT8                               0x10D2
#define CLK_UNORM_INT16                              0x10D3
#define CLK_UNORM_SHORT_565                          0x10D4
#define CLK_UNORM_SHORT_555                          0x10D5
#define CLK_UNORM_INT_101010                         0x10D6
#define CLK_SIGNED_INT8                              0x10D7
#define CLK_SIGNED_INT16                             0x10D8
#define CLK_SIGNED_INT32                             0x10D9
#define CLK_UNSIGNED_INT8                            0x10DA
#define CLK_UNSIGNED_INT16                           0x10DB
#define CLK_UNSIGNED_INT32                           0x10DC
#define CLK_HALF_FLOAT                               0x10DD
#define CLK_FLOAT                                    0x10DE
#define CLK_UNORM_INT24                              0x10DF

/* cl_addressing _mode */
#define CLK_ADDRESS_NONE                            0x00
#define CLK_ADDRESS_CLAMP_TO_EDGE                   0x02
#define CLK_ADDRESS_CLAMP                           0x04
#define CLK_ADDRESS_REPEAT                          0x06
#define CLK_ADDRESS_MIRRORED_REPEAT                 0x08

/* cl_sampler_info */
#define CLK_NORMALIZED_COORDS_FALSE                 0x00
#define CLK_NORMALIZED_COORDS_TRUE                  0x01

/* filter_mode */
#define CLK_FILTER_NEAREST                          0x10
#define CLK_FILTER_LINEAR                           0x20

/* barrier() flags */
#define CLK_LOCAL_MEM_FENCE                         0x01
#define CLK_GLOBAL_MEM_FENCE                        0x02

#endif

#endif