#include "tensorstore/data_type.h"
DataType tensorstore::GetDataType(std::string_view id);

Returns the DataType with DataType::name equal to id.

If id does not specify a supported data type name, returns the invalid data type of DataType().

Example:

EXPECT_EQ(dtype_v<int32_t>, GetDataType("int32"));
EXPECT_EQ(dtype_v<float>, GetDataType("float32"));