diff --git a/hipamd/include/hcc_detail/hip_runtime.h b/hipamd/include/hcc_detail/hip_runtime.h index 6a69c0441b..aa420e992d 100644 --- a/hipamd/include/hcc_detail/hip_runtime.h +++ b/hipamd/include/hcc_detail/hip_runtime.h @@ -24,7 +24,9 @@ THE SOFTWARE. * @brief Contains definitions of APIs for HIP runtime. */ -#pragma once +//#pragma once +#ifndef HIP_RUNTIME_H +#define HIP_RUNTIME_H //--- // Top part of file can be compiled with any compiler @@ -574,4 +576,4 @@ do {\ */ - +#endif diff --git a/hipamd/include/hcc_detail/hip_runtime_api.h b/hipamd/include/hcc_detail/hip_runtime_api.h index 58df3a2068..013597bba6 100644 --- a/hipamd/include/hcc_detail/hip_runtime_api.h +++ b/hipamd/include/hcc_detail/hip_runtime_api.h @@ -19,8 +19,9 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#pragma once - +//#pragma once +#ifndef HIP_RUNTIME_API_H +#define HIP_RUNTIME_API_H /** * @file hcc_detail/hip_runtime_api.h * @brief Contains C function APIs for HIP runtime. This file does not use any HCC builtin or special language extensions (-hc mode) ; those functions in hip_runtime.h. @@ -1065,3 +1066,5 @@ hipError_t hipDriverGetVersion(int *driverVersion) ; /** * @} */ + +#endif diff --git a/hipamd/include/hcc_detail/hip_texture.h b/hipamd/include/hcc_detail/hip_texture.h index 1a20f1960b..53a6acf2bf 100644 --- a/hipamd/include/hcc_detail/hip_texture.h +++ b/hipamd/include/hcc_detail/hip_texture.h @@ -19,7 +19,12 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#pragma once + +//#pragma once + +#ifndef HIP_TEXTURE_H +#define HIP_TEXTURE_H + /** * @file hcc_detail/hip_texture.h * @brief HIP C++ Texture API for hcc compiler @@ -201,3 +206,6 @@ hipError_t hipUnbindTexture(struct texture *tex) /** * @} */ + +#endif + diff --git a/hipamd/include/hcc_detail/hip_vector_types.h b/hipamd/include/hcc_detail/hip_vector_types.h index 7d3ed98431..50030e4756 100644 --- a/hipamd/include/hcc_detail/hip_vector_types.h +++ b/hipamd/include/hcc_detail/hip_vector_types.h @@ -25,6 +25,9 @@ THE SOFTWARE. * @brief Defines the different newt vector types for HIP runtime. */ +#ifndef HIP_VECTOR_TYPES_H +#define HIP_VECTOR_TYPES_H + #if defined (__HCC__) && (__hcc_workweek__ < 16032) #error("This version of HIP requires a newer version of HCC."); #endif @@ -196,3 +199,6 @@ TWO_COMPONENT_ACCESS (double, double2); THREE_COMPONENT_ACCESS(double, double3); FOUR_COMPONENT_ACCESS (double, double4); */ + +#endif + diff --git a/hipamd/include/hcc_detail/host_defines.h b/hipamd/include/hcc_detail/host_defines.h index 6e12e26e0b..dd9d60fc27 100644 --- a/hipamd/include/hcc_detail/host_defines.h +++ b/hipamd/include/hcc_detail/host_defines.h @@ -25,6 +25,9 @@ THE SOFTWARE. * @brief TODO-doc */ +#ifndef HOST_DEFINES_H +#define HOST_DEFINES_H + #ifdef __HCC__ /** * Function and kernel markers @@ -67,3 +70,5 @@ THE SOFTWARE. #define __constant__ #endif + +#endif diff --git a/hipamd/include/hcc_detail/staging_buffer.h b/hipamd/include/hcc_detail/staging_buffer.h index 7152bb2216..fe53f8474d 100644 --- a/hipamd/include/hcc_detail/staging_buffer.h +++ b/hipamd/include/hcc_detail/staging_buffer.h @@ -17,7 +17,9 @@ OUT OF OR INN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#pragma once +//#pragma once +#ifndef STAGING_BUFFER_H +#define STAGING_BUFFER_H #include "hsa.h" @@ -58,3 +60,5 @@ private: hsa_signal_t _completion_signal[_max_buffers]; std::mutex _copy_lock; // provide thread-safe access }; + +#endif diff --git a/hipamd/include/hcc_detail/trace_helper.h b/hipamd/include/hcc_detail/trace_helper.h index 13af1eab26..3740d8b9a7 100644 --- a/hipamd/include/hcc_detail/trace_helper.h +++ b/hipamd/include/hcc_detail/trace_helper.h @@ -16,7 +16,10 @@ LIABILITY, WHETHER INN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR INN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#pragma once +//#pragma once + +#ifndef TRACE_HELPER_H +#define TRACE_HELPER_H #include #include @@ -116,3 +119,5 @@ inline std::string ToString(T first, Args... args) { return ToString(first) + ", " + ToString(args...) ; } + +#endif