| 287 | std::string GetDataType4(DataType type) { return GetDataType(type) + "4"; } |
| 288 | |
| 289 | std::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 | |
| 304 | std::string GetTensorDeclaration(TensorStorageType storage_type, |
| 305 | const std::string& tensor_name, |
no test coverage detected