| 370 | } |
| 371 | |
| 372 | size_t CpuArithmeticKernel::get_mws(const CPUInfo &platform, size_t thread_count) const |
| 373 | { |
| 374 | ARM_COMPUTE_UNUSED(thread_count); |
| 375 | |
| 376 | #if defined(ENABLE_FP32_KERNELS) |
| 377 | if (this->_run_method == &neon_fp32_elementwise_binary<ArithmeticOperation::MIN> || |
| 378 | this->_run_method == &neon_fp32_elementwise_binary<ArithmeticOperation::MAX>) |
| 379 | { |
| 380 | size_t mws = ICPPKernel::default_mws; |
| 381 | if (platform.get_cpu_model() == CPUModel::N1) |
| 382 | { |
| 383 | mws = default_min_max_mws_N1_fp32_neon; |
| 384 | } |
| 385 | else if (platform.get_cpu_model() == CPUModel::V1) |
| 386 | { |
| 387 | mws = default_min_max_mws_V1_fp32_neon; |
| 388 | } |
| 389 | else |
| 390 | { |
| 391 | return ICPPKernel::default_mws; |
| 392 | } |
| 393 | |
| 394 | // tensor is 1D or was re-interpreted as 1D |
| 395 | if (this->window().shape().num_dimensions() == 1) |
| 396 | { |
| 397 | return mws; |
| 398 | } |
| 399 | else |
| 400 | { |
| 401 | // scale mws down by the number of elements along all the dimensions (x, z, w, etc) except the one |
| 402 | // that we parallelize along (the y dimension). This allows for parallelization when the Y_SIZE is small |
| 403 | // but the other sizes are large, which boosts performance. |
| 404 | mws = static_cast<size_t>(mws / (this->window().num_iterations_total() / this->window().num_iterations(1))); |
| 405 | return std::max(static_cast<size_t>(1), mws); |
| 406 | } |
| 407 | } |
| 408 | #else /* ENABLE_FP32_KERNELS */ |
| 409 | ARM_COMPUTE_UNUSED(platform); |
| 410 | #endif /* ENABLE_FP32_KERNELS */ |
| 411 | return ICPPKernel::default_mws; |
| 412 | } |
| 413 | |
| 414 | /** The division operator */ |
| 415 |
nothing calls this directly
no test coverage detected