SWDEV-240806 - Add methods to update kernel command parameters
Change-Id: Iba90a31f9c5d6d4f2b60b7ccf903325c03d4d245
[ROCm/clr commit: 050d54b503]
Этот коммит содержится в:
коммит произвёл
Maneesh Gupta
родитель
aae046174c
Коммит
730977698a
@@ -915,9 +915,18 @@ class NDRangeKernelCommand : public Command {
|
||||
//! Return the kernel NDRange.
|
||||
const NDRangeContainer& sizes() const { return sizes_; }
|
||||
|
||||
//! updates kernel NDRange.
|
||||
void setSizes(const size_t* globalWorkOffset, const size_t* globalWorkSize,
|
||||
const size_t* localWorkSize) {
|
||||
sizes_.update(3, globalWorkOffset, globalWorkSize, localWorkSize);
|
||||
}
|
||||
|
||||
//! Return the shared memory size
|
||||
uint32_t sharedMemBytes() const { return sharedMemBytes_; }
|
||||
|
||||
//! updates shared memory size
|
||||
uint32_t setSharedMemBytes(uint32_t sharedMemBytes) { sharedMemBytes_ = sharedMemBytes; }
|
||||
|
||||
//! Return the cooperative groups mode
|
||||
bool cooperativeGroups() const { return (extraParam_ & CooperativeGroups) ? true : false; }
|
||||
|
||||
|
||||
@@ -136,6 +136,16 @@ class NDRangeContainer : public HeapObject {
|
||||
}
|
||||
}
|
||||
|
||||
//! updates nd-range container
|
||||
void update(size_t dimensions, const size_t* globalWorkOffset, const size_t* globalWorkSize,
|
||||
const size_t* localWorkSize) {
|
||||
for (size_t i = 0; i < dimensions; ++i) {
|
||||
offset_[i] = globalWorkOffset != NULL ? globalWorkOffset[i] : 0;
|
||||
global_[i] = globalWorkSize[i];
|
||||
local_[i] = localWorkSize[i];
|
||||
}
|
||||
}
|
||||
|
||||
//! Return the number of dimensions.
|
||||
size_t dimensions() const { return dimensions_; }
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user