This file is indexed.

/usr/lib/x86_64-linux-gnu/beignet/include/ocl_defines.h is in beignet-opencl-icd 1.3.0-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
/*
 * Copyright © 2012 - 2014 Intel Corporation
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
 *
 */
#ifndef __OCL_COMMON_DEF_H__
#define __OCL_COMMON_DEF_H__

#define __CL_VERSION_1_0__ 100
#define __CL_VERSION_1_1__ 110
#define __CL_VERSION_1_2__ 120
#define CL_VERSION_1_0 100
#define CL_VERSION_1_1 110
#define CL_VERSION_1_2 120
#if (__OPENCL_C_VERSION__ >= 200)
#define __OPENCL_VERSION__ 200
#define CL_VERSION_2_0 200
#else
#define __OPENCL_VERSION__ 120
#endif
#define __ENDIAN_LITTLE__ 1
#define __IMAGE_SUPPORT__ 1
#define __kernel_exec(X, TYPE) __kernel __attribute__((work_group_size_hint(X,1,1))) \
                                        __attribute__((vec_type_hint(TYPE)))
#define kernel_exec(X, TYPE) __kernel_exec(X, TYPE)

#endif /* end of __OCL_COMMON_DEF_H__ */
// This file includes defines that are common to both kernel code and
// the NVPTX back-end.
#ifndef __OCL_COMMON_DEFINES__
#define __OCL_COMMON_DEFINES__
//
// Common defines for Image intrinsics
// Channel order
#define CLK_HAS_ALPHA(color) (color == CLK_A || color == CLK_RA || color == CLK_RGBA || color == CLK_BGRA || color == CLK_ARGB || color == CLK_sRGBA || color == CLK_sBGRA)
enum {
  CLK_R = 0x10B0,
  CLK_A = 0x10B1,
  CLK_RG = 0x10B2,
  CLK_RA = 0x10B3,
  CLK_RGB = 0x10B4,
  CLK_RGBA = 0x10B5,
  CLK_BGRA = 0x10B6,
  CLK_ARGB = 0x10B7,

#if (__NV_CL_C_VERSION == __NV_CL_C_VERSION_1_0)
  CLK_xRGB = 0x10B7,
#endif

  CLK_INTENSITY = 0x10B8,
  CLK_LUMINANCE = 0x10B9

#if (__NV_CL_C_VERSION >= __NV_CL_C_VERSION_1_1)
  ,
  CLK_Rx = 0x10BA,
  CLK_RGx = 0x10BB,
  CLK_RGBx = 0x10BC
#endif
#if (__NV_CL_C_VERSION >= __NV_CL_C_VERSION_2_0)
  ,
  CLK_sRGBA = 0x10C1,
  CLK_sBGRA = 0x10C2
#endif
};


typedef enum clk_channel_type {
  // valid formats for float return types
  CLK_SNORM_INT8 = 0x10D0,            // four channel RGBA unorm8
  CLK_SNORM_INT16 = 0x10D1,           // four channel RGBA unorm16
  CLK_UNORM_INT8 = 0x10D2,            // four channel RGBA unorm8
  CLK_UNORM_INT16 = 0x10D3,           // four channel RGBA unorm16
  CLK_HALF_FLOAT = 0x10DD,            // four channel RGBA half
  CLK_FLOAT = 0x10DE,                 // four channel RGBA float

#if (__NV_CL_C_VERSION >= __NV_CL_C_VERSION_1_1)
  CLK_UNORM_SHORT_565 = 0x10D4,
  CLK_UNORM_SHORT_555 = 0x10D5,
  CLK_UNORM_INT_101010 = 0x10D6,
#endif

  // valid only for integer return types
  CLK_SIGNED_INT8 =  0x10D7,
  CLK_SIGNED_INT16 = 0x10D8,
  CLK_SIGNED_INT32 = 0x10D9,
  CLK_UNSIGNED_INT8 = 0x10DA,
  CLK_UNSIGNED_INT16 = 0x10DB,
  CLK_UNSIGNED_INT32 = 0x10DC,

  // CI SPI for CPU
  __CLK_UNORM_INT8888 ,         // four channel ARGB unorm8
  __CLK_UNORM_INT8888R,        // four channel BGRA unorm8

  __CLK_VALID_IMAGE_TYPE_COUNT,
  __CLK_INVALID_IMAGE_TYPE = __CLK_VALID_IMAGE_TYPE_COUNT,
  __CLK_VALID_IMAGE_TYPE_MASK_BITS = 4,         // number of bits required to
                                                // represent any image type
  __CLK_VALID_IMAGE_TYPE_MASK = ( 1 << __CLK_VALID_IMAGE_TYPE_MASK_BITS ) - 1
}clk_channel_type;

typedef enum clk_sampler_type {
    __CLK_NORMALIZED_BASE          = 0,
    CLK_NORMALIZED_COORDS_FALSE    = 0,
    CLK_NORMALIZED_COORDS_TRUE     = (1 << __CLK_NORMALIZED_BASE),
    __CLK_NORMALIZED_MASK          = (CLK_NORMALIZED_COORDS_FALSE |
                                      CLK_NORMALIZED_COORDS_TRUE),
    __CLK_NORMALIZED_BITS          = 1,        // number of bits required to
                                               // represent normalization
    __CLK_ADDRESS_BASE             = 0,
    CLK_ADDRESS_NONE               = (0 << __CLK_ADDRESS_BASE),
    CLK_ADDRESS_CLAMP_TO_EDGE      = (2 << __CLK_ADDRESS_BASE),
    CLK_ADDRESS_CLAMP              = (4 << __CLK_ADDRESS_BASE),
    CLK_ADDRESS_REPEAT             = (6 << __CLK_ADDRESS_BASE),
    CLK_ADDRESS_MIRROR             = (8 << __CLK_ADDRESS_BASE),

#if (__NV_CL_C_VERSION >= __NV_CL_C_VERSION_1_1)
    CLK_ADDRESS_MIRRORED_REPEAT    = CLK_ADDRESS_MIRROR,
#endif
    __CLK_ADDRESS_MASK             = (CLK_ADDRESS_NONE | CLK_ADDRESS_CLAMP |
                                     CLK_ADDRESS_CLAMP_TO_EDGE |
                                     CLK_ADDRESS_REPEAT | CLK_ADDRESS_MIRROR),
    __CLK_ADDRESS_BITS             = 4,        // number of bits required to
                                               // represent address info
    __CLK_FILTER_BASE              = (__CLK_ADDRESS_BASE +  __CLK_ADDRESS_BITS),
    CLK_FILTER_ANISOTROPIC         = (0 << __CLK_FILTER_BASE),
    CLK_FILTER_NEAREST             = (1 << __CLK_FILTER_BASE),
    CLK_FILTER_LINEAR              = (2 << __CLK_FILTER_BASE),
    __CLK_FILTER_MASK              = (CLK_FILTER_NEAREST | CLK_FILTER_LINEAR |
                                     CLK_FILTER_ANISOTROPIC),
    __CLK_FILTER_BITS              = 2,        // number of bits required to
                                               // represent address info

    __CLK_MIP_BASE                 = (__CLK_FILTER_BASE + __CLK_FILTER_BITS),
    CLK_MIP_NEAREST                = (0 << __CLK_MIP_BASE),
    CLK_MIP_LINEAR                 = (1 << __CLK_MIP_BASE),
    CLK_MIP_ANISOTROPIC            = (2 << __CLK_MIP_BASE),
    __CLK_MIP_MASK                 = (CLK_MIP_NEAREST | CLK_MIP_LINEAR |
                                     CLK_MIP_ANISOTROPIC),
    __CLK_MIP_BITS                 = 2,

    __CLK_SAMPLER_BITS             = (__CLK_MIP_BASE + __CLK_MIP_BITS),
    __CLK_SAMPLER_MASK             = (__CLK_MIP_MASK | __CLK_FILTER_MASK |
                                      __CLK_NORMALIZED_MASK | __CLK_ADDRESS_MASK),

    __CLK_SAMPLER_ARG_BASE         = (__CLK_MIP_BASE + __CLK_SAMPLER_BITS),
    __CLK_SAMPLER_ARG_BITS         = 8,
    __CLK_SAMPLER_ARG_MASK         = (((1 << __CLK_SAMPLER_ARG_BITS) - 1) << __CLK_SAMPLER_ARG_BASE),
    __CLK_SAMPLER_ARG_KEY_BIT      = (1 << (__CLK_SAMPLER_ARG_BASE + __CLK_SAMPLER_ARG_BITS)),
    __CLK_SAMPLER_ARG_KEY_BITS     = 1,

} clk_sampler_type;

#endif   /* __OCL_COMMON_DEFINES__ */