@@ -344,6 +344,26 @@ struct GenericKernelTy {
344344 return AchievedOccupancy;
345345 }
346346
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+
347367protected:
348368 // / Get the execution mode name of the kernel.
349369 const char *getExecutionModeName () const {
@@ -431,26 +451,6 @@ struct GenericKernelTy {
431451 // / The maximum number of threads which the kernel could leverage.
432452 uint32_t MaxNumThreads;
433453
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-
454454 // / The kernel environment, including execution flags.
455455 KernelEnvironmentTy KernelEnvironment;
456456
0 commit comments