aboutsummaryrefslogtreecommitdiff
path: root/utils/Utils.h
diff options
context:
space:
mode:
authorGian Marco Iodice <gianmarco.iodice@arm.com>2017-09-28 18:31:26 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:35:24 +0000
commitae27e943a096074075d97d273d3b95f8cd84a61d (patch)
tree81982c4472c0da1cd72562073bff26e2416eb056 /utils/Utils.h
parent3c2c4336b7d7dfb9120e6e4d0f0d5cd6852f9b29 (diff)
downloadComputeLibrary-ae27e943a096074075d97d273d3b95f8cd84a61d.tar.gz
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>
Diffstat (limited to 'utils/Utils.h')
-rw-r--r--utils/Utils.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/Utils.h b/utils/Utils.h
index 47a352e905..b0e1abeb5f 100644
--- a/utils/Utils.h
+++ b/utils/Utils.h
@@ -86,7 +86,7 @@ std::tuple<unsigned int, unsigned int, int> parse_ppm_header(std::ifstream &fs);
* @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 @@ void map(T &tensor, bool blocking)
* @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 @@ void unmap(T &tensor)
* @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 @@ void map(CLTensor &tensor, bool blocking)
*
* @param tensor Tensor to be unmapped
*/
-void unmap(CLTensor &tensor)
+inline void unmap(CLTensor &tensor)
{
tensor.unmap();
}