Rename device access functions
Rename functions that access devices to reflect the derived device they return. This includes the base device::Device and the derived gpu/pal/roc device classes in both NullDevice and Device forms. Change to use the least derived versions to clarify what operations will be available. Change-Id: I1abb6bfed7efa24852bc8d0d49acaea357d8b5d0
This commit is contained in:
@@ -289,7 +289,7 @@ class NullProgram : public device::Program {
|
||||
);
|
||||
|
||||
//! Return a typecasted GPU device
|
||||
gpu::NullDevice& dev() {
|
||||
gpu::NullDevice& gpuNullDevice() {
|
||||
return const_cast<gpu::NullDevice&>(static_cast<const gpu::NullDevice&>(device()));
|
||||
}
|
||||
|
||||
@@ -339,10 +339,7 @@ class Program : public NullProgram {
|
||||
//! Returns pritnf info array
|
||||
const std::vector<device::PrintfInfo>& printfInfo() const { return printf_; }
|
||||
|
||||
//! Return a typecasted GPU device
|
||||
gpu::Device& dev() { return const_cast<gpu::Device&>(static_cast<const gpu::Device&>(device())); }
|
||||
|
||||
protected:
|
||||
protected:
|
||||
private:
|
||||
//! Disable copy constructor
|
||||
Program(const Program&);
|
||||
@@ -350,6 +347,11 @@ protected:
|
||||
//! Disable operator=
|
||||
Program& operator=(const Program&);
|
||||
|
||||
//! Return a typecasted GPU device
|
||||
gpu::Device& gpuDevice() {
|
||||
return const_cast<gpu::Device&>(static_cast<const gpu::Device&>(device()));
|
||||
}
|
||||
|
||||
HwConstBuffers constBufs_; //!< Constant buffers for the global store
|
||||
gpu::Memory* glbData_; //!< Global data store
|
||||
};
|
||||
@@ -467,8 +469,15 @@ class HSAILProgram : public device::Program {
|
||||
|
||||
const std::vector<Memory*>& globalStores() const { return globalStores_; }
|
||||
|
||||
//! Return a typecasted GPU device
|
||||
gpu::Device& dev() { return const_cast<gpu::Device&>(static_cast<const gpu::Device&>(device())); }
|
||||
//! Return a typecasted GPU null device.
|
||||
gpu::NullDevice& gpuNullDevice() {
|
||||
return const_cast<gpu::NullDevice&>(static_cast<const gpu::NullDevice&>(device()));
|
||||
}
|
||||
|
||||
//! Return a typecasted GPU device. The device must not be the NullDevice.
|
||||
gpu::Device& gpuDevice() {
|
||||
return const_cast<gpu::Device&>(static_cast<const gpu::Device&>(device()));
|
||||
}
|
||||
|
||||
//! Returns GPU kernel table
|
||||
const Memory* kernelTable() const { return kernels_; }
|
||||
|
||||
Verwijs in nieuw issue
Block a user