Skip to content

Commit

Permalink
Defer to Tensorstore for dtype size
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianMichell committed Sep 13, 2024
1 parent 83ebcd3 commit 1d00713
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions mdio/variable.h
Original file line number Diff line number Diff line change
Expand Up @@ -1735,11 +1735,7 @@ struct VariableData {
// We have to get the raw pointer
char* offset_addr = reinterpret_cast<char*>(offset_ptr.get());
ptrdiff_t byte_diff = offset_addr - origin_addr;
if constexpr (std::is_same_v<T, void>) {
return byte_diff / dtype().size();
} else {
return byte_diff / sizeof(T);
}
return byte_diff / dtype().size();
}

// An identifier for the variable.
Expand Down

0 comments on commit 1d00713

Please sign in to comment.