-
#include "tensorstore/data_type.h" - DataType tensorstore::GetDataType(std::string_view id);
Returns the
DataTypewithDataType::nameequal toid.If
iddoes not specify a supported data type name, returns the invalid data type ofDataType().Example:
EXPECT_EQ(dtype_v<int32_t>, GetDataType("int32")); EXPECT_EQ(dtype_v<float>, GetDataType("float32"));