@@ -89,22 +89,26 @@ struct __tgt_async_info {
89
89
90
90
// / This struct contains all of the arguments to a target kernel region launch.
91
91
struct KernelArgsTy {
92
- uint32_t Version; // Version of this struct for ABI compatibility.
93
- uint32_t NumArgs; // Number of arguments in each input pointer.
94
- void **ArgBasePtrs; // Base pointer of each argument (e.g. a struct).
95
- void **ArgPtrs; // Pointer to the argument data.
96
- int64_t *ArgSizes; // Size of the argument data in bytes.
97
- int64_t *ArgTypes; // Type of the data (e.g. to / from).
98
- void **ArgNames; // Name of the data for debugging, possibly null.
99
- void **ArgMappers; // User-defined mappers, possibly null.
100
- uint64_t Tripcount; // Tripcount for the teams / distribute loop, 0 otherwise.
92
+ uint32_t Version = 0 ; // Version of this struct for ABI compatibility.
93
+ uint32_t NumArgs = 0 ; // Number of arguments in each input pointer.
94
+ void **ArgBasePtrs =
95
+ nullptr ; // Base pointer of each argument (e.g. a struct).
96
+ void **ArgPtrs = nullptr ; // Pointer to the argument data.
97
+ int64_t *ArgSizes = nullptr ; // Size of the argument data in bytes.
98
+ int64_t *ArgTypes = nullptr ; // Type of the data (e.g. to / from).
99
+ void **ArgNames = nullptr ; // Name of the data for debugging, possibly null.
100
+ void **ArgMappers = nullptr ; // User-defined mappers, possibly null.
101
+ uint64_t Tripcount =
102
+ 0 ; // Tripcount for the teams / distribute loop, 0 otherwise.
101
103
struct {
102
104
uint64_t NoWait : 1 ; // Was this kernel spawned with a `nowait` clause.
103
105
uint64_t Unused : 63 ;
104
- } Flags;
105
- uint32_t NumTeams[3 ]; // The number of teams (for x,y,z dimension).
106
- uint32_t ThreadLimit[3 ]; // The number of threads (for x,y,z dimension).
107
- uint32_t DynCGroupMem; // Amount of dynamic cgroup memory requested.
106
+ } Flags = {0 , 0 };
107
+ // The number of teams (for x,y,z dimension).
108
+ uint32_t NumTeams[3 ] = {0 , 0 , 0 };
109
+ // The number of threads (for x,y,z dimension).
110
+ uint32_t ThreadLimit[3 ] = {0 , 0 , 0 };
111
+ uint32_t DynCGroupMem = 0 ; // Amount of dynamic cgroup memory requested.
108
112
};
109
113
static_assert (sizeof (KernelArgsTy().Flags) == sizeof(uint64_t ),
110
114
"Invalid struct size");
0 commit comments