This file is indexed.

/usr/lib/x86_64-linux-gnu/beignet/include/ocl_atom.h is in beignet-opencl-icd 1.1.1-2.

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
/*
 * 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_ATOM_H__
#define __OCL_ATOM_H__
#include "ocl_types.h"

/////////////////////////////////////////////////////////////////////////////
// Atomic functions
/////////////////////////////////////////////////////////////////////////////

OVERLOADABLE uint atomic_add(volatile __global uint *p, uint val);
OVERLOADABLE uint atomic_add(volatile __local uint *p, uint val);
OVERLOADABLE int atomic_add(volatile __global int *p, int val);
OVERLOADABLE int atomic_add(volatile __local int *p, int val);

OVERLOADABLE uint atomic_sub(volatile __global uint *p, uint val);
OVERLOADABLE uint atomic_sub(volatile __local uint *p, uint val);
OVERLOADABLE int atomic_sub(volatile __global int *p, int val);
OVERLOADABLE int atomic_sub(volatile __local int *p, int val);

OVERLOADABLE uint atomic_and(volatile __global uint *p, uint val);
OVERLOADABLE uint atomic_and(volatile __local uint *p, uint val);
OVERLOADABLE int atomic_and(volatile __global int *p, int val);
OVERLOADABLE int atomic_and(volatile __local int *p, int val);

OVERLOADABLE uint atomic_or(volatile __global uint *p, uint val);
OVERLOADABLE uint atomic_or(volatile __local uint *p, uint val);
OVERLOADABLE int atomic_or(volatile __global int *p, int val);
OVERLOADABLE int atomic_or(volatile __local int *p, int val);

OVERLOADABLE uint atomic_xor(volatile __global uint *p, uint val);
OVERLOADABLE uint atomic_xor(volatile __local uint *p, uint val);
OVERLOADABLE int atomic_xor(volatile __global int *p, int val);
OVERLOADABLE int atomic_xor(volatile __local int *p, int val);

OVERLOADABLE uint atomic_xchg(volatile __global uint *p, uint val);
OVERLOADABLE uint atomic_xchg(volatile __local uint *p, uint val);
OVERLOADABLE int atomic_xchg(volatile __global int *p, int val);
OVERLOADABLE int atomic_xchg(volatile __local int *p, int val);

OVERLOADABLE int atomic_min(volatile __global int *p, int val);
OVERLOADABLE int atomic_min(volatile __local int *p, int val);

OVERLOADABLE int atomic_max(volatile __global int *p, int val);
OVERLOADABLE int atomic_max(volatile __local int *p, int val);

OVERLOADABLE uint atomic_min(volatile __global uint *p, uint val);
OVERLOADABLE uint atomic_min(volatile __local uint *p, uint val);

OVERLOADABLE uint atomic_max(volatile __global uint *p, uint val);
OVERLOADABLE uint atomic_max(volatile __local uint *p, uint val);

OVERLOADABLE float atomic_xchg (volatile __global float *p, float val);
OVERLOADABLE float atomic_xchg (volatile __local float *p, float val);

OVERLOADABLE uint atomic_inc (volatile __global uint *p);
OVERLOADABLE uint atomic_inc (volatile __local uint *p);
OVERLOADABLE int atomic_inc (volatile __global int *p);
OVERLOADABLE int atomic_inc (volatile __local int *p);

OVERLOADABLE uint atomic_dec (volatile __global uint *p);
OVERLOADABLE uint atomic_dec (volatile __local uint *p);
OVERLOADABLE int atomic_dec (volatile __global int *p);
OVERLOADABLE int atomic_dec (volatile __local int *p);

OVERLOADABLE uint atomic_cmpxchg (volatile __global uint *p, uint cmp, uint val);
OVERLOADABLE uint atomic_cmpxchg (volatile __local uint *p, uint cmp, uint val);
OVERLOADABLE int atomic_cmpxchg (volatile __global int *p, int cmp, int val);
OVERLOADABLE int atomic_cmpxchg (volatile __local int *p, int cmp, int val);


// XXX for conformance test
// The following atom_xxx api is on OpenCL spec 1.0.
#define atom_add atomic_add
#define atom_sub atomic_sub
#define atom_and atomic_and
#define atom_or atomic_or
#define atom_xor atomic_xor
#define atom_xchg atomic_xchg
#define atom_min atomic_min
#define atom_max atomic_max
#define atom_inc atomic_inc
#define atom_dec atomic_dec
#define atom_cmpxchg atomic_cmpxchg


#endif  /* __OCL_ATOM_H__ */