From d0b0cda7044c761a5b29c50fbf6e272fbafb48b7 Mon Sep 17 00:00:00 2001 From: Aditya Atluri Date: Tue, 29 Mar 2016 09:27:57 -0500 Subject: [PATCH] added host flags to hipDeviceBody test [ROCm/hip commit: f518d0f818b5cded7476c17f021b1a2b8577a872] --- projects/hip/tests/src/hipDeviceBody.cpp | 2 +- projects/hip/tests/src/hipDeviceHeader.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/projects/hip/tests/src/hipDeviceBody.cpp b/projects/hip/tests/src/hipDeviceBody.cpp index fb0b980713..2e740cf748 100644 --- a/projects/hip/tests/src/hipDeviceBody.cpp +++ b/projects/hip/tests/src/hipDeviceBody.cpp @@ -1,5 +1,5 @@ #include"hipDeviceHeader.h" -__device__ int add(int &a, int &b){ +__host__ __device__ int add(int &a, int &b){ return a+b; } diff --git a/projects/hip/tests/src/hipDeviceHeader.h b/projects/hip/tests/src/hipDeviceHeader.h index 265a2073c6..eb7bd05aa5 100644 --- a/projects/hip/tests/src/hipDeviceHeader.h +++ b/projects/hip/tests/src/hipDeviceHeader.h @@ -1,6 +1,7 @@ #ifndef HIPDEVICEHEADER_H #define HIPDEVICEHEADER_H #include"test_common.h" -__device__ int add(int a, int b); + +__host__ __device__ int add(int a, int b); #endif