Files
rocm-systems/tests/hsa-runtime/hsa-runtime.hpp
T
Jonathan R. Madsen fa4295db6b Initial Implementation: include (#10)
* Initial Implementation: include

* Initial Implementation: lib details (#11)

* Initial Implementation: lib details

* Initial Implementation: lib (#12)

* Initial Implementation: lib

* Initial Implementation: source (#13)

* Initial Implementation: source

* Initial Implementation: samples (#14)

* Initial Implementation: samples

* Initial Implementation: tests (#15)

* Initial Implementation: tests

* Initial Implementation: scripts (#16)

* Initial Implementation: scripts

* Initial Implementation: cmake (#17)

* Initial Implementation: cmake

* Initial Implementation: top-level files (#18)

* Initial Implementation: top-level files

- clang-format
- clang-tidy
- cmake-format
- ignore build and cache directories
- main CMakeLists.txt
- pyproject.toml (python formatting)
- VERSION file

* Initial Implementation: workflow (#19)

* Fix unused variable

- rocprofiler_register_warn_level
2023-08-17 14:59:24 -05:00

41 lines
716 B
C++

#pragma once
#define HSA_VERSION_MAJOR 2
#define HSA_VERSION_MINOR 1
#define HSA_VERSION_PATCH 0
#include <cstdint>
extern "C" {
// fake hsa function
void
hsa_init(void) __attribute__((visibility("default")));
}
namespace hsa
{
struct HsaApiTable
{
uint64_t size = 0;
decltype(::hsa_init)* hsa_init_fn = nullptr;
};
void
hsa_init();
// populates hsa api table with function pointers
inline void
initialize_hsa_api_table(HsaApiTable* dst)
{
dst->size = sizeof(HsaApiTable);
dst->hsa_init_fn = &::hsa::hsa_init;
}
// copies the api table from src to dst
inline void
copy_hsa_api_table(HsaApiTable* dst, const HsaApiTable* src)
{
*dst = *src;
}
} // namespace hsa