Only used for testing
| 331 | |
| 332 | // Only used for testing |
| 333 | void CopyInFrom(const void* memory) override |
| 334 | { |
| 335 | this->Map(true); |
| 336 | switch(this->GetDataType()) |
| 337 | { |
| 338 | case arm_compute::DataType::F32: |
| 339 | armcomputetensorutils::CopyArmComputeITensorData(static_cast<const float*>(memory), |
| 340 | this->GetTensor()); |
| 341 | break; |
| 342 | case arm_compute::DataType::U8: |
| 343 | case arm_compute::DataType::QASYMM8: |
| 344 | armcomputetensorutils::CopyArmComputeITensorData(static_cast<const uint8_t*>(memory), |
| 345 | this->GetTensor()); |
| 346 | break; |
| 347 | case arm_compute::DataType::F16: |
| 348 | armcomputetensorutils::CopyArmComputeITensorData(static_cast<const armnn::Half*>(memory), |
| 349 | this->GetTensor()); |
| 350 | break; |
| 351 | case arm_compute::DataType::QSYMM8: |
| 352 | case arm_compute::DataType::QSYMM8_PER_CHANNEL: |
| 353 | case arm_compute::DataType::QASYMM8_SIGNED: |
| 354 | armcomputetensorutils::CopyArmComputeITensorData(static_cast<const int8_t*>(memory), |
| 355 | this->GetTensor()); |
| 356 | break; |
| 357 | case arm_compute::DataType::S16: |
| 358 | case arm_compute::DataType::QSYMM16: |
| 359 | armcomputetensorutils::CopyArmComputeITensorData(static_cast<const int16_t*>(memory), |
| 360 | this->GetTensor()); |
| 361 | break; |
| 362 | case arm_compute::DataType::S32: |
| 363 | armcomputetensorutils::CopyArmComputeITensorData(static_cast<const int32_t*>(memory), |
| 364 | this->GetTensor()); |
| 365 | break; |
| 366 | default: |
| 367 | { |
| 368 | throw armnn::UnimplementedException(); |
| 369 | } |
| 370 | } |
| 371 | this->Unmap(); |
| 372 | } |
| 373 | |
| 374 | mutable arm_compute::CLSubTensor m_Tensor; |
| 375 | ITensorHandle* parentHandle = nullptr; |
nothing calls this directly
no test coverage detected