COMPMID-417 - Fix utils.h
map() and unmap() are not inline functions and can cause issues at compile time:
i.e.
multiple definition of `arm_compute::utils::unmap(arm_compute::CLTensor&)'
Change-Id: I2da3e70030d896a06feb995fa6ebf7a718fe0af6
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/89579
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
diff --git a/utils/Utils.h b/utils/Utils.h
index 47a352e..b0e1abe 100644
--- a/utils/Utils.h
+++ b/utils/Utils.h
@@ -86,7 +86,7 @@
* @param[in] blocking Specified if map is blocking or not
*/
template <typename T>
-void map(T &tensor, bool blocking)
+inline void map(T &tensor, bool blocking)
{
ARM_COMPUTE_UNUSED(tensor);
ARM_COMPUTE_UNUSED(blocking);
@@ -97,7 +97,7 @@
* @param tensor Tensor to be unmapped
*/
template <typename T>
-void unmap(T &tensor)
+inline void unmap(T &tensor)
{
ARM_COMPUTE_UNUSED(tensor);
}
@@ -108,7 +108,7 @@
* @param[in] tensor Tensor to be mapped
* @param[in] blocking Specified if map is blocking or not
*/
-void map(CLTensor &tensor, bool blocking)
+inline void map(CLTensor &tensor, bool blocking)
{
tensor.map(blocking);
}
@@ -117,7 +117,7 @@
*
* @param tensor Tensor to be unmapped
*/
-void unmap(CLTensor &tensor)
+inline void unmap(CLTensor &tensor)
{
tensor.unmap();
}