Removed trivial copy constructor, copy assignment operator.
PiperOrigin-RevId: 317678239 Change-Id: I02723cbe192c225f18231719201e350a138d3818
This commit is contained in:
parent
01c3f45f0f
commit
36c56b0faa
@ -105,14 +105,6 @@ struct GPUResourcesWithValue {
|
||||
class GPUObjectDescriptor {
|
||||
public:
|
||||
GPUObjectDescriptor() = default;
|
||||
GPUObjectDescriptor(const GPUObjectDescriptor& obj_desc)
|
||||
: state_vars_(obj_desc.state_vars_) {}
|
||||
GPUObjectDescriptor& operator=(const GPUObjectDescriptor& obj_desc) {
|
||||
if (this != &obj_desc) {
|
||||
state_vars_ = obj_desc.state_vars_;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
virtual ~GPUObjectDescriptor() = default;
|
||||
|
||||
void SetStateVar(const std::string& key, const std::string& value) const {
|
||||
|
@ -41,20 +41,6 @@ struct TensorLinearDescriptor : public GPUObjectDescriptor {
|
||||
LinearStorageType storage_type;
|
||||
DataType element_type; // FLOAT32 or FLOAT16
|
||||
|
||||
TensorLinearDescriptor() = default;
|
||||
TensorLinearDescriptor(const TensorLinearDescriptor& desc)
|
||||
: GPUObjectDescriptor(desc),
|
||||
storage_type(desc.storage_type),
|
||||
element_type(desc.element_type) {}
|
||||
TensorLinearDescriptor& operator=(const TensorLinearDescriptor& desc) {
|
||||
if (this != &desc) {
|
||||
storage_type = desc.storage_type;
|
||||
element_type = desc.element_type;
|
||||
GPUObjectDescriptor::operator=(desc);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
absl::Status PerformSelector(const std::string& selector,
|
||||
const std::vector<std::string>& args,
|
||||
const std::vector<std::string>& template_args,
|
||||
|
@ -48,20 +48,6 @@ struct TensorDescriptor : public GPUObjectDescriptor {
|
||||
TensorDescriptor() = default;
|
||||
TensorDescriptor(DataType dt, TensorStorageType st, Layout l)
|
||||
: data_type(dt), storage_type(st), layout(l) {}
|
||||
TensorDescriptor(const TensorDescriptor& desc)
|
||||
: GPUObjectDescriptor(desc),
|
||||
data_type(desc.data_type),
|
||||
storage_type(desc.storage_type),
|
||||
layout(desc.layout) {}
|
||||
TensorDescriptor& operator=(const TensorDescriptor& desc) {
|
||||
if (this != &desc) {
|
||||
data_type = desc.data_type;
|
||||
storage_type = desc.storage_type;
|
||||
layout = desc.layout;
|
||||
GPUObjectDescriptor::operator=(desc);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool operator==(const TensorDescriptor& d) const {
|
||||
return data_type == d.data_type && storage_type == d.storage_type &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user