From 28e9ba8da979cb709d86be6613da35c48ca8a225 Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Thu, 16 Jun 2016 16:18:35 +0530 Subject: [PATCH] Add compiler annotations to make_ functions Change-Id: Ic16cfe402dc5cb387b1b63ad311ce8b57ea07361 [ROCm/hip commit: d12651521f5b91af4e6872751e4bc982100070eb] --- projects/hip/include/hcc_detail/hip_vector_types.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/hip/include/hcc_detail/hip_vector_types.h b/projects/hip/include/hcc_detail/hip_vector_types.h index 0d1ad97663..1537b0fb70 100644 --- a/projects/hip/include/hcc_detail/hip_vector_types.h +++ b/projects/hip/include/hcc_detail/hip_vector_types.h @@ -185,10 +185,10 @@ __HIP_DEVICE__ double4 make_double4(double, double, double, double ); /* ///--- // Inline functions for creating vector types from basic types -#define ONE_COMPONENT_ACCESS(T, VT) inline VT make_ ##VT (T x) { VT t; t.x = x; return t; }; -#define TWO_COMPONENT_ACCESS(T, VT) inline VT make_ ##VT (T x, T y) { VT t; t.x=x; t.y=y; return t; }; -#define THREE_COMPONENT_ACCESS(T, VT) inline VT make_ ##VT (T x, T y, T z) { VT t; t.x=x; t.y=y; t.z=z; return t; }; -#define FOUR_COMPONENT_ACCESS(T, VT) inline VT make_ ##VT (T x, T y, T z, T w) { VT t; t.x=x; t.y=y; t.z=z; t.w=w; return t; }; +#define ONE_COMPONENT_ACCESS(T, VT) inline VT make_ ##VT [[hc]] [[cpu]] (T x) { VT t; t.x = x; return t; }; +#define TWO_COMPONENT_ACCESS(T, VT) inline VT make_ ##VT [[hc]] [[cpu]] (T x, T y) { VT t; t.x=x; t.y=y; return t; }; +#define THREE_COMPONENT_ACCESS(T, VT) inline VT make_ ##VT [[hc]] [[cpu]] (T x, T y, T z) { VT t; t.x=x; t.y=y; t.z=z; return t; }; +#define FOUR_COMPONENT_ACCESS(T, VT) inline VT make_ ##VT [[hc]] [[cpu]] (T x, T y, T z, T w) { VT t; t.x=x; t.y=y; t.z=z; t.w=w; return t; }; //signed: