MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / VisitDataType

Function VisitDataType

paddle/fluid/framework/data_type.h:146–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144
145template <typename Visitor>
146inline void VisitDataType(proto::VarType::Type type, Visitor visitor) {
147#define VisitDataTypeCallback(cpp_type, proto_type) \
148 do { \
149 if (type == proto_type) { \
150 visitor.template apply<cpp_type>(); \
151 return; \
152 } \
153 } while (0)
154
155 _ForEachDataType_(VisitDataTypeCallback);
156#undef VisitDataTypeCallback
157 PADDLE_THROW(common::errors::Unimplemented(
158 "Not supported proto::VarType::Type(%d) as data type.",
159 static_cast<int>(type)));
160}
161
162template <typename Visitor>
163inline void VisitDataTypeSmall(proto::VarType::Type type, Visitor visitor) {

Callers 5

TransDataTypeFunction · 0.70
TransComplexToRealFunction · 0.70
TransDataLayoutFunction · 0.70
TensorFromStreamFunction · 0.70
tensor_checkFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected