Commit 31875367 authored by Po-Yen, Chen's avatar Po-Yen, Chen
Browse files

Add Tensor<>::GetElementSpaceSizeInBytes()

parent dacc5119
...@@ -288,6 +288,8 @@ struct Tensor ...@@ -288,6 +288,8 @@ struct Tensor
std::size_t GetElementSpaceSize() const { return mDesc.GetElementSpaceSize(); } std::size_t GetElementSpaceSize() const { return mDesc.GetElementSpaceSize(); }
std::size_t GetElementSpaceSizeInBytes() const { return sizeof(T) * GetElementSpaceSize(); }
void SetZero() void SetZero()
{ {
for(auto& v : mData) for(auto& v : mData)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment