@@ -28,16 +28,12 @@ struct local_arg_info_t {
28
28
29
29
struct ur_kernel_handle_t_ : RefCounted {
30
30
31
- ur_kernel_handle_t_ (ur_program_handle_t hProgram, const char *name,
32
- nativecpu_task_t subhandler)
33
- : hProgram(hProgram), _name{name}, _subhandler{std::move (subhandler)} {}
34
-
35
31
ur_kernel_handle_t_ (const ur_kernel_handle_t_ &other)
36
32
: Args(other.Args), hProgram(other.hProgram), _name(other._name),
37
33
_subhandler (other._subhandler), _localArgInfo(other._localArgInfo),
38
34
_localMemPool(other._localMemPool),
39
35
_localMemPoolSize(other._localMemPoolSize),
40
- ReqdWGSize(other.ReqdWGSize) {
36
+ ReqdWGSize(other.ReqdWGSize), NDRangeKernel(other.NDRangeKernel) {
41
37
incrementReferenceCount ();
42
38
}
43
39
@@ -52,10 +48,11 @@ struct ur_kernel_handle_t_ : RefCounted {
52
48
nativecpu_task_t subhandler,
53
49
std::optional<native_cpu::WGSize_t> ReqdWGSize,
54
50
std::optional<native_cpu::WGSize_t> MaxWGSize,
55
- std::optional<uint64_t > MaxLinearWGSize)
51
+ std::optional<uint64_t > MaxLinearWGSize,
52
+ bool isNDRangeKernel)
56
53
: hProgram(hProgram), _name{name}, _subhandler{std::move (subhandler)},
57
54
ReqdWGSize (ReqdWGSize), MaxWGSize(MaxWGSize),
58
- MaxLinearWGSize (MaxLinearWGSize) {}
55
+ MaxLinearWGSize (MaxLinearWGSize), NDRangeKernel(isNDRangeKernel) {}
59
56
60
57
struct arguments {
61
58
using args_index_t = std::vector<void *>;
@@ -162,10 +159,13 @@ struct ur_kernel_handle_t_ : RefCounted {
162
159
163
160
void addPtrArg (void *Ptr , size_t Index) { Args.addPtrArg (Index, Ptr ); }
164
161
162
+ bool isNDRangeKernel () const { return NDRangeKernel; }
163
+
165
164
private:
166
165
char *_localMemPool = nullptr ;
167
166
size_t _localMemPoolSize = 0 ;
168
167
std::optional<native_cpu::WGSize_t> ReqdWGSize = std::nullopt;
169
168
std::optional<native_cpu::WGSize_t> MaxWGSize = std::nullopt;
170
169
std::optional<uint64_t > MaxLinearWGSize = std::nullopt;
170
+ const bool NDRangeKernel = false ;
171
171
};
0 commit comments