| 154 | } |
| 155 | |
| 156 | std::string ReadGlobalFLT4(TensorStorageType storage_type, DataType data_type, |
| 157 | const std::string& tensor_name, |
| 158 | const std::string& global_address, |
| 159 | TextureAddressMode address_mode) { |
| 160 | switch (storage_type) { |
| 161 | case TensorStorageType::BUFFER: |
| 162 | return absl::StrCat(tensor_name, "[", global_address, "]"); |
| 163 | case TensorStorageType::TEXTURE_2D: |
| 164 | case TensorStorageType::SINGLE_TEXTURE_2D: |
| 165 | case TensorStorageType::TEXTURE_ARRAY: |
| 166 | return absl::StrCat( |
| 167 | GetReadImageFromDataType(data_type), "(", tensor_name, |
| 168 | ", " + TextureAddressModeToString(address_mode) + ", ", |
| 169 | global_address, ")"); |
| 170 | case TensorStorageType::UNKNOWN: |
| 171 | return ""; |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | std::string ReadGlobalFloat4(TensorStorageType storage_type, |
| 176 | const std::string& tensor_name, |
no test coverage detected