Skip to content

Commit f1888e4

Browse files
committed
[libclc] Add some include guards and format a file
1 parent 9076458 commit f1888e4

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

libclc/generic/include/clc/clc.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef __CLC_CLC_H__
2+
#define __CLC_CLC_H__
3+
14
#ifndef cl_clang_storage_class_specifiers
25
#error Implementation requires cl_clang_storage_class_specifiers extension!
36
#endif
@@ -286,3 +289,5 @@
286289
#include <clc/image/image.h>
287290

288291
#pragma OPENCL EXTENSION all : disable
292+
293+
#endif // __CLC_CLC_H__
Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef __CLC_CLCMACROS_H__
2+
#define __CLC_CLCMACROS_H__
3+
14
/* 6.9 Preprocessor Directives and Macros
25
* Some of these are handled by clang or passed by clover */
36
#if __OPENCL_VERSION__ >= 110
@@ -9,10 +12,12 @@
912
#define CLC_VERSION_1_2 120
1013
#endif
1114

12-
#define NULL ((void*)0)
15+
#define NULL ((void *)0)
1316

14-
#define __kernel_exec(X, typen) __kernel \
15-
__attribute__((work_group_size_hint(X, 1, 1))) \
16-
__attribute__((vec_type_hint(typen)))
17+
#define __kernel_exec(X, typen) \
18+
__kernel __attribute__((work_group_size_hint(X, 1, 1))) \
19+
__attribute__((vec_type_hint(typen)))
1720

1821
#define kernel_exec(X, typen) __kernel_exec(X, typen)
22+
23+
#endif // __CLC_CLCMACROS_H__

0 commit comments

Comments
 (0)