@@ -344,6 +344,26 @@ struct GenericKernelTy {
344
344
return AchievedOccupancy;
345
345
}
346
346
347
+ // / Indicate if the kernel works in Generic SPMD, Generic or SPMD mode.
348
+ bool isGenericSPMDMode () const {
349
+ return ExecutionMode == OMP_TGT_EXEC_MODE_GENERIC_SPMD;
350
+ }
351
+ bool isGenericMode () const {
352
+ return ExecutionMode == OMP_TGT_EXEC_MODE_GENERIC;
353
+ }
354
+ bool isSPMDMode () const { return ExecutionMode == OMP_TGT_EXEC_MODE_SPMD; }
355
+
356
+ // / AMD-only execution modes
357
+ bool isBigJumpLoopMode () const {
358
+ return ExecutionMode == OMP_TGT_EXEC_MODE_SPMD_BIG_JUMP_LOOP;
359
+ }
360
+ bool isNoLoopMode () const {
361
+ return ExecutionMode == OMP_TGT_EXEC_MODE_SPMD_NO_LOOP;
362
+ }
363
+ bool isXTeamReductionsMode () const {
364
+ return ExecutionMode == OMP_TGT_EXEC_MODE_XTEAM_RED;
365
+ }
366
+
347
367
protected:
348
368
// / Get the execution mode name of the kernel.
349
369
const char *getExecutionModeName () const {
@@ -431,26 +451,6 @@ struct GenericKernelTy {
431
451
// / The maximum number of threads which the kernel could leverage.
432
452
uint32_t MaxNumThreads;
433
453
434
- // / Indicate if the kernel works in Generic SPMD, Generic or SPMD mode.
435
- bool isGenericSPMDMode () const {
436
- return ExecutionMode == OMP_TGT_EXEC_MODE_GENERIC_SPMD;
437
- }
438
- bool isGenericMode () const {
439
- return ExecutionMode == OMP_TGT_EXEC_MODE_GENERIC;
440
- }
441
- bool isSPMDMode () const { return ExecutionMode == OMP_TGT_EXEC_MODE_SPMD; }
442
-
443
- // / AMD-only execution modes
444
- bool isBigJumpLoopMode () const {
445
- return ExecutionMode == OMP_TGT_EXEC_MODE_SPMD_BIG_JUMP_LOOP;
446
- }
447
- bool isNoLoopMode () const {
448
- return ExecutionMode == OMP_TGT_EXEC_MODE_SPMD_NO_LOOP;
449
- }
450
- bool isXTeamReductionsMode () const {
451
- return ExecutionMode == OMP_TGT_EXEC_MODE_XTEAM_RED;
452
- }
453
-
454
454
// / The kernel environment, including execution flags.
455
455
KernelEnvironmentTy KernelEnvironment;
456
456
0 commit comments