include/hip/math_functions.h Source File

include/hip/math_functions.h Source File#

HIP Runtime API Reference: include/hip/math_functions.h Source File
math_functions.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
3 *
4 * SPDX-License-Identifier: MIT
5 */
6
7#ifndef HIP_INCLUDE_HIP_MATH_FUNCTIONS_H
8#define HIP_INCLUDE_HIP_MATH_FUNCTIONS_H
9
10// Some standard header files, these are included by hc.hpp and so want to make them avail on both
11// paths to provide a consistent include env and avoid "missing symbol" errors that only appears
12// on NVCC path:
13
14#if !defined(__HIPCC_RTC__)
15#include <hip/hip_common.h>
16#endif
17
18#if defined(__HIP_PLATFORM_AMD__) && !defined(__HIP_PLATFORM_NVIDIA__)
19#include <hip/amd_detail/amd_math_functions.h>
20#elif !defined(__HIP_PLATFORM_AMD__) && defined(__HIP_PLATFORM_NVIDIA__)
21// #include <hip/nvidia_detail/math_functions.h>
22#else
23#error ("Must define exactly one of __HIP_PLATFORM_AMD__ or __HIP_PLATFORM_NVIDIA__");
24#endif
25
26#endif