forked from OSchip/llvm-project
[libomptarget][amdgpu][nfc] Refactor #includes
Create a hsa_api.h header that includes the ROCr headers in use Drop some unused headers and _cplusplus macros Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D106455
This commit is contained in:
parent
1a57ee1276
commit
a733bbbd17
|
@ -4,10 +4,9 @@
|
|||
* This file is distributed under the MIT License. See LICENSE.txt for details.
|
||||
*===------------------------------------------------------------------------*/
|
||||
#include "atmi_runtime.h"
|
||||
#include "hsa_api.h"
|
||||
#include "internal.h"
|
||||
#include "rt.h"
|
||||
#include <hsa.h>
|
||||
#include <hsa_ext_amd.h>
|
||||
#include <memory>
|
||||
|
||||
/*
|
||||
|
|
|
@ -7,16 +7,14 @@
|
|||
#define INCLUDE_ATMI_INTEROP_HSA_H_
|
||||
|
||||
#include "atmi_runtime.h"
|
||||
#include "hsa.h"
|
||||
#include "hsa_ext_amd.h"
|
||||
#include "hsa_api.h"
|
||||
#include "internal.h"
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \defgroup interop_hsa_functions ATMI-HSA Interop
|
||||
* @{
|
||||
*/
|
||||
|
@ -80,8 +78,6 @@ hsa_status_t atmi_interop_hsa_get_kernel_info(
|
|||
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // INCLUDE_ATMI_INTEROP_HSA_H_
|
||||
|
|
|
@ -7,16 +7,9 @@
|
|||
#define INCLUDE_ATMI_RUNTIME_H_
|
||||
|
||||
#include "atmi.h"
|
||||
#include "hsa.h"
|
||||
#include <inttypes.h>
|
||||
#include <stdlib.h>
|
||||
#ifndef __cplusplus
|
||||
#include <stdbool.h>
|
||||
#endif
|
||||
#include "hsa_api.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \defgroup module_functions ATMI Module
|
||||
* @{
|
||||
|
@ -68,8 +61,6 @@ hsa_status_t atmi_memcpy_d2h(hsa_signal_t sig, void *hostDest,
|
|||
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // INCLUDE_ATMI_RUNTIME_H_
|
||||
|
|
|
@ -4,15 +4,13 @@
|
|||
* This file is distributed under the MIT License. See LICENSE.txt for details.
|
||||
*===------------------------------------------------------------------------*/
|
||||
#include "atmi_runtime.h"
|
||||
#include "hsa_api.h"
|
||||
#include "internal.h"
|
||||
#include "machine.h"
|
||||
#include "rt.h"
|
||||
#include <cassert>
|
||||
#include <hsa.h>
|
||||
#include <hsa_ext_amd.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
|
||||
using core::TaskImpl;
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
//===------- hsa_api.h --------------------------------------- C++ --------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
#ifndef AMDGPU_HSA_API_H_INCLUDED
|
||||
#define AMDGPU_HSA_API_H_INCLUDED
|
||||
|
||||
#include "hsa.h"
|
||||
#include "hsa_ext_amd.h"
|
||||
|
||||
#endif
|
|
@ -12,18 +12,14 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <atomic>
|
||||
#include <cstring>
|
||||
#include <deque>
|
||||
#include <map>
|
||||
#include <queue>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "hsa.h"
|
||||
#include "hsa_ext_amd.h"
|
||||
#include "hsa_ext_finalize.h"
|
||||
#include "hsa_api.h"
|
||||
|
||||
#include "atmi.h"
|
||||
#include "atmi_runtime.h"
|
||||
|
@ -44,9 +40,7 @@ typedef struct atmi_implicit_args_s {
|
|||
unsigned long kernarg_template_ptr;
|
||||
} atmi_implicit_args_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
#define DEBUG_PRINT(fmt, ...) \
|
||||
|
@ -65,9 +59,7 @@ typedef struct hsa_signal_s {
|
|||
} hsa_signal_t;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* ---------------------------------------------------------------------------------
|
||||
* Simulated CPU Data Structures and API
|
||||
|
|
|
@ -5,10 +5,9 @@
|
|||
*===------------------------------------------------------------------------*/
|
||||
#include "machine.h"
|
||||
#include "atmi_runtime.h"
|
||||
#include "hsa_api.h"
|
||||
#include "internal.h"
|
||||
#include <cassert>
|
||||
#include <hsa.h>
|
||||
#include <hsa_ext_amd.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <vector>
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
#ifndef SRC_RUNTIME_INCLUDE_MACHINE_H_
|
||||
#define SRC_RUNTIME_INCLUDE_MACHINE_H_
|
||||
#include "atmi.h"
|
||||
#include "hsa_api.h"
|
||||
#include "internal.h"
|
||||
#include <hsa.h>
|
||||
#include <hsa_ext_amd.h>
|
||||
#include <vector>
|
||||
|
||||
class ATLMemory;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#define SRC_RUNTIME_INCLUDE_RT_H_
|
||||
|
||||
#include "atmi_runtime.h"
|
||||
#include "hsa.h"
|
||||
#include "hsa_api.h"
|
||||
#include <string>
|
||||
|
||||
namespace core {
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <shared_mutex>
|
||||
#include <thread>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
|
|
Loading…
Reference in New Issue