diff options
Diffstat (limited to 'utils/Utils.h')
-rw-r--r-- | utils/Utils.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/utils/Utils.h b/utils/Utils.h index 4e5bc815ab..9d2b517708 100644 --- a/utils/Utils.h +++ b/utils/Utils.h @@ -35,6 +35,7 @@ #ifdef ARM_COMPUTE_CL #include "arm_compute/core/CL/OpenCL.h" +#include "arm_compute/runtime/CL/CLDistribution1D.h" #include "arm_compute/runtime/CL/CLTensor.h" #endif /* ARM_COMPUTE_CL */ #ifdef ARM_COMPUTE_GC @@ -189,6 +190,25 @@ inline void unmap(CLTensor &tensor) { tensor.unmap(); } + +/** Maps a distribution if needed + * + * @param[in] distribution Distribution to be mapped + * @param[in] blocking Specified if map is blocking or not + */ +inline void map(CLDistribution1D &distribution, bool blocking) +{ + distribution.map(blocking); +} + +/** Unmaps a distribution if needed + * + * @param distribution Distribution to be unmapped + */ +inline void unmap(CLDistribution1D &distribution) +{ + distribution.unmap(); +} #endif /* ARM_COMPUTE_CL */ #ifdef ARM_COMPUTE_GC |