Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions libclc/opencl/include/clc/opencl/as_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
//
//===----------------------------------------------------------------------===//

#ifndef __CLC_OPENCL_AS_TYPE_H__
#define __CLC_OPENCL_AS_TYPE_H__

#include <clc/opencl/opencl-base.h>

#define as_char(x) __builtin_astype(x, char)
#define as_uchar(x) __builtin_astype(x, uchar)
#define as_short(x) __builtin_astype(x, short)
Expand Down Expand Up @@ -83,3 +88,5 @@
#define as_half8(x) __builtin_astype(x, half8)
#define as_half16(x) __builtin_astype(x, half16)
#endif

#endif // __CLC_OPENCL_AS_TYPE_H__
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//

#ifndef __CLC_OPENCL_ASYNC_ASYNC_WORK_GROUP_COPY_H__
#define __CLC_OPENCL_ASYNC_ASYNC_WORK_GROUP_COPY_H__

#define __CLC_DST_ADDR_SPACE local
#define __CLC_SRC_ADDR_SPACE global
#define __CLC_BODY <clc/opencl/async/async_work_group_copy.inc>
Expand All @@ -23,3 +26,5 @@
#include <clc/math/gentype.inc>
#undef __CLC_DST_ADDR_SPACE
#undef __CLC_SRC_ADDR_SPACE

#endif // __CLC_OPENCL_ASYNC_ASYNC_WORK_GROUP_COPY_H__
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//

#ifndef __CLC_OPENCL_ASYNC_ASYNC_WORK_GROUP_STRIDED_COPY_H__
#define __CLC_OPENCL_ASYNC_ASYNC_WORK_GROUP_STRIDED_COPY_H__

#define __CLC_DST_ADDR_SPACE local
#define __CLC_SRC_ADDR_SPACE global
#define __CLC_BODY <clc/opencl/async/async_work_group_strided_copy.inc>
Expand All @@ -23,3 +26,5 @@
#include <clc/math/gentype.inc>
#undef __CLC_DST_ADDR_SPACE
#undef __CLC_SRC_ADDR_SPACE

#endif // __CLC_OPENCL_ASYNC_ASYNC_WORK_GROUP_STRIDED_COPY_H__
5 changes: 5 additions & 0 deletions libclc/opencl/include/clc/opencl/async/prefetch.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@
//
//===----------------------------------------------------------------------===//

#ifndef __CLC_OPENCL_ASYNC_PREFETCH_H__
#define __CLC_OPENCL_ASYNC_PREFETCH_H__

#define __CLC_BODY <clc/opencl/async/prefetch.inc>
#include <clc/integer/gentype.inc>

#define __CLC_BODY <clc/opencl/async/prefetch.inc>
#include <clc/math/gentype.inc>

#endif // __CLC_OPENCL_ASYNC_PREFETCH_H__
7 changes: 7 additions & 0 deletions libclc/opencl/include/clc/opencl/async/wait_group_events.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,12 @@
//
//===----------------------------------------------------------------------===//

#ifndef __CLC_OPENCL_ASYNC_WAIT_GROUP_EVENTS_H__
#define __CLC_OPENCL_ASYNC_WAIT_GROUP_EVENTS_H__

#include <clc/opencl/opencl-base.h>

_CLC_DECL _CLC_OVERLOAD void wait_group_events(int num_events,
event_t *event_list);

#endif // __CLC_OPENCL_ASYNC_WAIT_GROUP_EVENTS_H__
7 changes: 7 additions & 0 deletions libclc/opencl/include/clc/opencl/atomic/atom_add.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
//
//===----------------------------------------------------------------------===//

#ifndef __CLC_OPENCL_ATOMIC_ATOM_ADD_H__
#define __CLC_OPENCL_ATOMIC_ATOM_ADD_H__

#include <clc/opencl/opencl-base.h>

#ifdef cl_khr_global_int32_base_atomics
#define FUNCTION atom_add
#define __CLC_ADDRESS_SPACE global
Expand All @@ -22,3 +27,5 @@
#define FUNCTION atom_add
#include <clc/opencl/atomic/atom_decl_int64.inc>
#endif // cl_khr_int64_base_atomics

#endif // __CLC_OPENCL_ATOMIC_ATOM_ADD_H__
7 changes: 7 additions & 0 deletions libclc/opencl/include/clc/opencl/atomic/atom_and.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
//
//===----------------------------------------------------------------------===//

#ifndef __CLC_OPENCL_ATOMIC_ATOM_AND_H__
#define __CLC_OPENCL_ATOMIC_ATOM_AND_H__

#include <clc/opencl/opencl-base.h>

#ifdef cl_khr_global_int32_extended_atomics
#define FUNCTION atom_and
#define __CLC_ADDRESS_SPACE global
Expand All @@ -22,3 +27,5 @@
#define FUNCTION atom_and
#include <clc/opencl/atomic/atom_decl_int64.inc>
#endif // cl_khr_int64_extended_atomics

#endif // __CLC_OPENCL_ATOMIC_ATOM_AND_H__
7 changes: 7 additions & 0 deletions libclc/opencl/include/clc/opencl/atomic/atom_cmpxchg.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
//
//===----------------------------------------------------------------------===//

#ifndef __CLC_OPENCL_ATOMIC_ATOM_CMPXCHG_H__
#define __CLC_OPENCL_ATOMIC_ATOM_CMPXCHG_H__

#include <clc/opencl/opencl-base.h>

#include <clc/clcfunc.h>
#include <clc/clctypes.h>

Expand Down Expand Up @@ -37,3 +42,5 @@ _CLC_OVERLOAD _CLC_DECL unsigned long
atom_cmpxchg(volatile local unsigned long *p, unsigned long cmp,
unsigned long val);
#endif // cl_khr_int64_base_atomics

#endif // __CLC_OPENCL_ATOMIC_ATOM_CMPXCHG_H__
7 changes: 7 additions & 0 deletions libclc/opencl/include/clc/opencl/atomic/atom_dec.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
//
//===----------------------------------------------------------------------===//

#ifndef __CLC_OPENCL_ATOMIC_ATOM_DEC_H__
#define __CLC_OPENCL_ATOMIC_ATOM_DEC_H__

#include <clc/opencl/opencl-base.h>

#include <clc/clcfunc.h>
#include <clc/clctypes.h>

Expand All @@ -26,3 +31,5 @@ atom_dec(volatile global unsigned long *p);
_CLC_OVERLOAD _CLC_DECL long atom_dec(volatile local long *p);
_CLC_OVERLOAD _CLC_DECL unsigned long atom_dec(volatile local unsigned long *p);
#endif // cl_khr_int64_base_atomics

#endif // __CLC_OPENCL_ATOMIC_ATOM_DEC_H__
7 changes: 7 additions & 0 deletions libclc/opencl/include/clc/opencl/atomic/atom_inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
//
//===----------------------------------------------------------------------===//

#ifndef __CLC_OPENCL_ATOMIC_ATOM_INC_H__
#define __CLC_OPENCL_ATOMIC_ATOM_INC_H__

#include <clc/opencl/opencl-base.h>

#include <clc/clcfunc.h>
#include <clc/clctypes.h>

Expand All @@ -26,3 +31,5 @@ atom_inc(volatile global unsigned long *p);
_CLC_OVERLOAD _CLC_DECL long atom_inc(volatile local long *p);
_CLC_OVERLOAD _CLC_DECL unsigned long atom_inc(volatile local unsigned long *p);
#endif // cl_khr_int64_base_atomics

#endif // __CLC_OPENCL_ATOMIC_ATOM_INC_H__
7 changes: 7 additions & 0 deletions libclc/opencl/include/clc/opencl/atomic/atom_max.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
//
//===----------------------------------------------------------------------===//

#ifndef __CLC_OPENCL_ATOMIC_ATOM_MAX_H__
#define __CLC_OPENCL_ATOMIC_ATOM_MAX_H__

#include <clc/opencl/opencl-base.h>

#ifdef cl_khr_global_int32_extended_atomics
#define FUNCTION atom_max
#define __CLC_ADDRESS_SPACE global
Expand All @@ -22,3 +27,5 @@
#define FUNCTION atom_max
#include <clc/opencl/atomic/atom_decl_int64.inc>
#endif // cl_khr_int64_extended_atomics

#endif // __CLC_OPENCL_ATOMIC_ATOM_MAX_H__
7 changes: 7 additions & 0 deletions libclc/opencl/include/clc/opencl/atomic/atom_min.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
//
//===----------------------------------------------------------------------===//

#ifndef __CLC_OPENCL_ATOMIC_ATOM_MIN_H__
#define __CLC_OPENCL_ATOMIC_ATOM_MIN_H__

#include <clc/opencl/opencl-base.h>

#ifdef cl_khr_global_int32_extended_atomics
#define FUNCTION atom_min
#define __CLC_ADDRESS_SPACE global
Expand All @@ -22,3 +27,5 @@
#define FUNCTION atom_min
#include <clc/opencl/atomic/atom_decl_int64.inc>
#endif // cl_khr_int64_extended_atomics

#endif // __CLC_OPENCL_ATOMIC_ATOM_MIN_H__
7 changes: 7 additions & 0 deletions libclc/opencl/include/clc/opencl/atomic/atom_or.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
//
//===----------------------------------------------------------------------===//

#ifndef __CLC_OPENCL_ATOMIC_ATOM_OR_H__
#define __CLC_OPENCL_ATOMIC_ATOM_OR_H__

#include <clc/opencl/opencl-base.h>

#ifdef cl_khr_global_int32_extended_atomics
#define FUNCTION atom_or
#define __CLC_ADDRESS_SPACE global
Expand All @@ -22,3 +27,5 @@
#define FUNCTION atom_or
#include <clc/opencl/atomic/atom_decl_int64.inc>
#endif // cl_khr_int64_extended_atomics

#endif // __CLC_OPENCL_ATOMIC_ATOM_OR_H__
7 changes: 7 additions & 0 deletions libclc/opencl/include/clc/opencl/atomic/atom_sub.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
//
//===----------------------------------------------------------------------===//

#ifndef __CLC_OPENCL_ATOMIC_ATOM_SUB_H__
#define __CLC_OPENCL_ATOMIC_ATOM_SUB_H__

#include <clc/opencl/opencl-base.h>

#ifdef cl_khr_global_int32_base_atomics
#define FUNCTION atom_sub
#define __CLC_ADDRESS_SPACE global
Expand All @@ -22,3 +27,5 @@
#define FUNCTION atom_sub
#include <clc/opencl/atomic/atom_decl_int64.inc>
#endif // cl_khr_int64_base_atomics

#endif // __CLC_OPENCL_ATOMIC_ATOM_SUB_H__
7 changes: 7 additions & 0 deletions libclc/opencl/include/clc/opencl/atomic/atom_xchg.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
//
//===----------------------------------------------------------------------===//

#ifndef __CLC_OPENCL_ATOMIC_ATOM_XCHG_H__
#define __CLC_OPENCL_ATOMIC_ATOM_XCHG_H__

#include <clc/opencl/opencl-base.h>

#ifdef cl_khr_global_int32_base_atomics
#define FUNCTION atom_xchg
#define __CLC_ADDRESS_SPACE global
Expand All @@ -22,3 +27,5 @@
#define FUNCTION atom_xchg
#include <clc/opencl/atomic/atom_decl_int64.inc>
#endif // cl_khr_int64_base_atomics

#endif // __CLC_OPENCL_ATOMIC_ATOM_XCHG_H__
7 changes: 7 additions & 0 deletions libclc/opencl/include/clc/opencl/atomic/atom_xor.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
//
//===----------------------------------------------------------------------===//

#ifndef __CLC_OPENCL_ATOMIC_ATOM_XOR_H__
#define __CLC_OPENCL_ATOMIC_ATOM_XOR_H__

#include <clc/opencl/opencl-base.h>

#ifdef cl_khr_global_int32_extended_atomics
#define FUNCTION atom_xor
#define __CLC_ADDRESS_SPACE global
Expand All @@ -22,3 +27,5 @@
#define FUNCTION atom_xor
#include <clc/opencl/atomic/atom_decl_int64.inc>
#endif // cl_khr_int64_extended_atomics

#endif // __CLC_OPENCL_ATOMIC_ATOM_XOR_H__
7 changes: 7 additions & 0 deletions libclc/opencl/include/clc/opencl/atomic/atomic_add.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,12 @@
//
//===----------------------------------------------------------------------===//

#ifndef __CLC_OPENCL_ATOMIC_ATOMIC_ADD_H__
#define __CLC_OPENCL_ATOMIC_ATOMIC_ADD_H__

#include <clc/opencl/opencl-base.h>

#define FUNCTION atomic_add
#include <clc/opencl/atomic/atomic_decl.inc>

#endif // __CLC_OPENCL_ATOMIC_ATOMIC_ADD_H__
7 changes: 7 additions & 0 deletions libclc/opencl/include/clc/opencl/atomic/atomic_and.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,12 @@
//
//===----------------------------------------------------------------------===//

#ifndef __CLC_OPENCL_ATOMIC_ATOMIC_AND_H__
#define __CLC_OPENCL_ATOMIC_ATOMIC_AND_H__

#include <clc/opencl/opencl-base.h>

#define FUNCTION atomic_and
#include <clc/opencl/atomic/atomic_decl.inc>

#endif // __CLC_OPENCL_ATOMIC_ATOMIC_AND_H__
7 changes: 7 additions & 0 deletions libclc/opencl/include/clc/opencl/atomic/atomic_cmpxchg.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@
//
//===----------------------------------------------------------------------===//

#ifndef __CLC_OPENCL_ATOMIC_ATOMIC_CMPXCHG_H__
#define __CLC_OPENCL_ATOMIC_ATOMIC_CMPXCHG_H__

#include <clc/opencl/opencl-base.h>

_CLC_OVERLOAD _CLC_DECL int atomic_cmpxchg(volatile local int *, int, int);
_CLC_OVERLOAD _CLC_DECL int atomic_cmpxchg(volatile global int *, int, int);
_CLC_OVERLOAD _CLC_DECL uint atomic_cmpxchg(volatile local uint *, uint, uint);
_CLC_OVERLOAD _CLC_DECL uint atomic_cmpxchg(volatile global uint *, uint, uint);

#endif // __CLC_OPENCL_ATOMIC_ATOMIC_CMPXCHG_H__
7 changes: 7 additions & 0 deletions libclc/opencl/include/clc/opencl/atomic/atomic_dec.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@
//
//===----------------------------------------------------------------------===//

#ifndef __CLC_OPENCL_ATOMIC_ATOMIC_DEC_H__
#define __CLC_OPENCL_ATOMIC_ATOMIC_DEC_H__

#include <clc/opencl/opencl-base.h>

_CLC_OVERLOAD _CLC_DECL int atomic_dec(volatile local int *);
_CLC_OVERLOAD _CLC_DECL int atomic_dec(volatile global int *);
_CLC_OVERLOAD _CLC_DECL uint atomic_dec(volatile local uint *);
_CLC_OVERLOAD _CLC_DECL uint atomic_dec(volatile global uint *);

#endif // __CLC_OPENCL_ATOMIC_ATOMIC_DEC_H__
7 changes: 7 additions & 0 deletions libclc/opencl/include/clc/opencl/atomic/atomic_inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@
//
//===----------------------------------------------------------------------===//

#ifndef __CLC_OPENCL_ATOMIC_ATOMIC_INC_H__
#define __CLC_OPENCL_ATOMIC_ATOMIC_INC_H__

#include <clc/opencl/opencl-base.h>

_CLC_OVERLOAD _CLC_DECL int atomic_inc(volatile local int *);
_CLC_OVERLOAD _CLC_DECL int atomic_inc(volatile global int *);
_CLC_OVERLOAD _CLC_DECL uint atomic_inc(volatile local uint *);
_CLC_OVERLOAD _CLC_DECL uint atomic_inc(volatile global uint *);

#endif // __CLC_OPENCL_ATOMIC_ATOMIC_INC_H__
7 changes: 7 additions & 0 deletions libclc/opencl/include/clc/opencl/atomic/atomic_max.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,12 @@
//
//===----------------------------------------------------------------------===//

#ifndef __CLC_OPENCL_ATOMIC_ATOMIC_MAX_H__
#define __CLC_OPENCL_ATOMIC_ATOMIC_MAX_H__

#include <clc/opencl/opencl-base.h>

#define FUNCTION atomic_max
#include <clc/opencl/atomic/atomic_decl.inc>

#endif // __CLC_OPENCL_ATOMIC_ATOMIC_MAX_H__
7 changes: 7 additions & 0 deletions libclc/opencl/include/clc/opencl/atomic/atomic_min.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,12 @@
//
//===----------------------------------------------------------------------===//

#ifndef __CLC_OPENCL_ATOMIC_ATOMIC_MIN_H__
#define __CLC_OPENCL_ATOMIC_ATOMIC_MIN_H__

#include <clc/opencl/opencl-base.h>

#define FUNCTION atomic_min
#include <clc/opencl/atomic/atomic_decl.inc>

#endif // __CLC_OPENCL_ATOMIC_ATOMIC_MIN_H__
7 changes: 7 additions & 0 deletions libclc/opencl/include/clc/opencl/atomic/atomic_or.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,12 @@
//
//===----------------------------------------------------------------------===//

#ifndef __CLC_OPENCL_ATOMIC_ATOMIC_OR_H__
#define __CLC_OPENCL_ATOMIC_ATOMIC_OR_H__

#include <clc/opencl/opencl-base.h>

#define FUNCTION atomic_or
#include <clc/opencl/atomic/atomic_decl.inc>

#endif // __CLC_OPENCL_ATOMIC_ATOMIC_OR_H__
7 changes: 7 additions & 0 deletions libclc/opencl/include/clc/opencl/atomic/atomic_sub.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,12 @@
//
//===----------------------------------------------------------------------===//

#ifndef __CLC_OPENCL_ATOMIC_ATOMIC_SUB_H__
#define __CLC_OPENCL_ATOMIC_ATOMIC_SUB_H__

#include <clc/opencl/opencl-base.h>

#define FUNCTION atomic_sub
#include <clc/opencl/atomic/atomic_decl.inc>

#endif // __CLC_OPENCL_ATOMIC_ATOMIC_SUB_H__
Loading
Loading