MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / GetTensorDeclaration

Function GetTensorDeclaration

tensorflow/lite/delegates/gpu/cl/kernels/util.cc:289–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

287std::string GetDataType4(DataType type) { return GetDataType(type) + "4"; }
288
289std::string GetTensorDeclaration(TensorStorageType storage_type,
290 AccessType access, DataType data_type) {
291 switch (storage_type) {
292 case TensorStorageType::BUFFER:
293 return absl::StrCat("__global ", GetDataType4(data_type), "*");
294 case TensorStorageType::TEXTURE_2D:
295 case TensorStorageType::SINGLE_TEXTURE_2D:
296 return GetImageModifier(access) + " image2d_t";
297 case TensorStorageType::TEXTURE_ARRAY:
298 return GetImageModifier(access) + " image2d_array_t";
299 case TensorStorageType::UNKNOWN:
300 return "";
301 }
302}
303
304std::string GetTensorDeclaration(TensorStorageType storage_type,
305 const std::string& tensor_name,

Callers 3

InitMethod · 0.85
InitMethod · 0.85
GetDeclarationMethod · 0.85

Calls 3

GetDataType4Function · 0.85
GetImageModifierFunction · 0.85
StrCatFunction · 0.50

Tested by

no test coverage detected