[libclc] Add some include guards and format a file

This commit is contained in:
Fraser Cormack 2024-11-04 10:35:40 +00:00
parent 9076458287
commit f1888e4029
2 changed files with 14 additions and 4 deletions

View File

@ -1,3 +1,6 @@
#ifndef __CLC_CLC_H__
#define __CLC_CLC_H__
#ifndef cl_clang_storage_class_specifiers
#error Implementation requires cl_clang_storage_class_specifiers extension!
#endif
@ -286,3 +289,5 @@
#include <clc/image/image.h>
#pragma OPENCL EXTENSION all : disable
#endif // __CLC_CLC_H__

View File

@ -1,3 +1,6 @@
#ifndef __CLC_CLCMACROS_H__
#define __CLC_CLCMACROS_H__
/* 6.9 Preprocessor Directives and Macros
* Some of these are handled by clang or passed by clover */
#if __OPENCL_VERSION__ >= 110
@ -9,10 +12,12 @@
#define CLC_VERSION_1_2 120
#endif
#define NULL ((void*)0)
#define NULL ((void *)0)
#define __kernel_exec(X, typen) __kernel \
__attribute__((work_group_size_hint(X, 1, 1))) \
__attribute__((vec_type_hint(typen)))
#define __kernel_exec(X, typen) \
__kernel __attribute__((work_group_size_hint(X, 1, 1))) \
__attribute__((vec_type_hint(typen)))
#define kernel_exec(X, typen) __kernel_exec(X, typen)
#endif // __CLC_CLCMACROS_H__