Skip to content

Commit f7c3c64

Browse files
[NFC][libomptarget]Remove TRUE,FALSE macros from option.h
Summary: [NFC][libomptarget]Remove TRUE,FALSE macros from option.h Subset of D69423. Patch series ends with removing option.h. Reviewers: ABataev, jdoerfert, grokos Subscribers: openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D69463
1 parent 1ce8a5b commit f7c3c64

File tree

6 files changed

+8
-14
lines changed

6 files changed

+8
-14
lines changed

openmp/libomptarget/deviceRTLs/nvptx/src/cancel.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ EXTERN int32_t __kmpc_cancellationpoint(kmp_Ident *loc, int32_t global_tid,
1616
int32_t cancelVal) {
1717
PRINT(LD_IO, "call kmpc_cancellationpoint(cancel val %d)\n", (int)cancelVal);
1818
// disabled
19-
return FALSE;
19+
return 0;
2020
}
2121

2222
EXTERN int32_t __kmpc_cancel(kmp_Ident *loc, int32_t global_tid,
2323
int32_t cancelVal) {
2424
PRINT(LD_IO, "call kmpc_cancel(cancel val %d)\n", (int)cancelVal);
2525
// disabled
26-
return FALSE;
26+
return 0;
2727
}

openmp/libomptarget/deviceRTLs/nvptx/src/debug.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ NOINLINE static void check(bool cond) { assert(cond); }
195195
}
196196
#else
197197

198-
#define DON(_flag) (FALSE)
198+
#define DON(_flag) (0)
199199
#define PRINT0(flag, str)
200200
#define PRINT(flag, str, _args...)
201201

@@ -247,7 +247,7 @@ NOINLINE static void check(bool cond) { assert(cond); }
247247

248248
#else
249249

250-
#define TON(_flag) (FALSE)
250+
#define TON(_flag) (0)
251251
#define ASSERT0(_flag, _cond, _str)
252252
#define ASSERT(_flag, _cond, _str, _args...)
253253

@@ -279,7 +279,7 @@ NOINLINE static void check(bool cond) { assert(cond); }
279279

280280
#else
281281

282-
#define WON(_flag) (FALSE)
282+
#define WON(_flag) (0)
283283
#define WARNING0(_flag, _str)
284284
#define WARNING(_flag, _str, _args...)
285285

openmp/libomptarget/deviceRTLs/nvptx/src/libcall.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ EXTERN void omp_get_partition_place_nums(int *place_nums) {
286286
}
287287

288288
EXTERN int omp_get_cancellation(void) {
289-
int rc = FALSE; // currently false only
289+
int rc = 0;
290290
PRINT(LD_IO, "call omp_get_cancellation() returns %d\n", rc);
291291
return rc;
292292
}

openmp/libomptarget/deviceRTLs/nvptx/src/loop.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public:
170170
break;
171171
}
172172
default: {
173-
ASSERT(LT_FUSSY, FALSE, "unknown schedtype %d", (int)schedtype);
173+
ASSERT(LT_FUSSY, 0, "unknown schedtype %d", (int)schedtype);
174174
PRINT(LD_LOOP, "unknown schedtype %d, revert back to static chunk\n",
175175
(int)schedtype);
176176
ForStaticChunk(lastiter, lb, ub, stride, chunk, gtid,

openmp/libomptarget/deviceRTLs/nvptx/src/option.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,5 @@
5858

5959
#define INLINE __forceinline__ __device__
6060
#define NOINLINE __noinline__ __device__
61-
#ifndef TRUE
62-
#define TRUE 1
63-
#endif
64-
#ifndef FALSE
65-
#define FALSE 0
66-
#endif
6761

6862
#endif

openmp/libomptarget/deviceRTLs/nvptx/src/parallel.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ EXTERN void __kmpc_push_simd_limit(kmp_Ident *loc, int32_t tid,
460460
EXTERN void __kmpc_push_num_teams(kmp_Ident *loc, int32_t tid,
461461
int32_t num_teams, int32_t thread_limit) {
462462
PRINT(LD_IO, "call kmpc_push_num_teams %d\n", (int)num_teams);
463-
ASSERT0(LT_FUSSY, FALSE,
463+
ASSERT0(LT_FUSSY, 0,
464464
"should never have anything with new teams on device");
465465
}
466466

0 commit comments

Comments
 (0)