199d75adc0
[ROCm/hip commit: 2f376c9b25]
40 lines
1.2 KiB
C++
40 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#include "llvm/ADT/StringRef.h"
|
|
#include <set>
|
|
#include <map>
|
|
|
|
#include "Types.h"
|
|
|
|
// TODO: This shouldn't really be here. More restructuring needed...
|
|
struct hipCounter {
|
|
llvm::StringRef hipName;
|
|
ConvTypes countType;
|
|
ApiTypes countApiType;
|
|
bool unsupported;
|
|
};
|
|
|
|
#define HIP_UNSUPPORTED true
|
|
|
|
/// Macros to ignore.
|
|
extern const std::set<llvm::StringRef> CUDA_EXCLUDES;
|
|
|
|
/// Maps cuda header names to hip header names.
|
|
extern const std::map<llvm::StringRef, hipCounter> CUDA_INCLUDE_MAP;
|
|
|
|
/// Maps the names of CUDA types to the corresponding hip types.
|
|
extern const std::map<llvm::StringRef, hipCounter> CUDA_TYPE_NAME_MAP;
|
|
|
|
/// Map all other CUDA identifiers (function/macro names, enum values) to hip versions.
|
|
extern const std::map<llvm::StringRef, hipCounter> CUDA_IDENTIFIER_MAP;
|
|
|
|
/**
|
|
* The union of all the above maps.
|
|
*
|
|
* This should be used rarely, but is still needed to convert macro definitions (which can
|
|
* contain any combination of the above things). AST walkers can usually get away with just
|
|
* looking in the lookup table for the type of element they are processing, however, saving
|
|
* a great deal of time.
|
|
*/
|
|
const std::map<llvm::StringRef, hipCounter>& CUDA_RENAMES_MAP();
|