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

Function ReadGlobalFloat4

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

Source from the content-addressed store, hash-verified

173}
174
175std::string ReadGlobalFloat4(TensorStorageType storage_type,
176 const std::string& tensor_name,
177 const std::string& global_address,
178 TextureAddressMode address_mode) {
179 switch (storage_type) {
180 case TensorStorageType::BUFFER:
181 return absl::StrCat("convert_float4(", tensor_name, "[", global_address,
182 "])");
183 case TensorStorageType::TEXTURE_2D:
184 case TensorStorageType::SINGLE_TEXTURE_2D:
185 case TensorStorageType::TEXTURE_ARRAY:
186 return absl::StrCat(
187 "read_imagef(", tensor_name,
188 ", " + TextureAddressModeToString(address_mode) + ", ",
189 global_address, ")");
190 case TensorStorageType::UNKNOWN:
191 return "";
192 }
193}
194
195std::string ReadGlobalFLT4(TensorStorageType storage_type, DataType data_type,
196 const std::string& tensor_name,

Callers 1

ReadAsFloat3DMethod · 0.85

Calls 3

StrCatFunction · 0.50

Tested by

no test coverage detected