include/hip/channel_descriptor.h Source File

include/hip/channel_descriptor.h Source File#

HIP Runtime API Reference: include/hip/channel_descriptor.h Source File
channel_descriptor.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_CHANNEL_DESCRIPTOR_H
8#define HIP_INCLUDE_HIP_CHANNEL_DESCRIPTOR_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
15#if defined(__HIP_PLATFORM_AMD__) && !defined(__HIP_PLATFORM_NVIDIA__)
16#include <hip/amd_detail/amd_channel_descriptor.h>
17#elif !defined(__HIP_PLATFORM_AMD__) && defined(__HIP_PLATFORM_NVIDIA__)
18#include <hip/nvidia_detail/nvidia_channel_descriptor.h>
19#else
20#error ("Must define exactly one of __HIP_PLATFORM_AMD__ or __HIP_PLATFORM_NVIDIA__");
21#endif
22
23#endif