Changeset View
Changeset View
Standalone View
Standalone View
openmp/libomptarget/src/private.h
Show All 11 Lines | |||||
#ifndef _OMPTARGET_PRIVATE_H | #ifndef _OMPTARGET_PRIVATE_H | ||||
#define _OMPTARGET_PRIVATE_H | #define _OMPTARGET_PRIVATE_H | ||||
#include <omptarget.h> | #include <omptarget.h> | ||||
#include <cstdint> | #include <cstdint> | ||||
extern int target_data_begin(DeviceTy &Device, int32_t arg_num, | extern int target_data_begin(DeviceTy &Device, int32_t arg_num, | ||||
Lint: Pre-merge checks: clang-tidy: error: unknown type name 'DeviceTy' [clang-diagnostic-error]
[[https://github. | |||||
void **args_base, void **args, int64_t *arg_sizes, | void **args_base, void **args, int64_t *arg_sizes, | ||||
int64_t *arg_types, | int64_t *arg_types, | ||||
__tgt_async_info *async_info_ptr); | __tgt_async_info *async_info_ptr); | ||||
extern int target_data_end(DeviceTy &Device, int32_t arg_num, void **args_base, | extern int target_data_end(DeviceTy &Device, int32_t arg_num, void **args_base, | ||||
Lint: Pre-merge checks clang-tidy: error: unknown type name 'DeviceTy' [clang-diagnostic-error] Lint: Pre-merge checks: clang-tidy: error: unknown type name 'DeviceTy' [clang-diagnostic-error]
[[https://github. | |||||
void **args, int64_t *arg_sizes, int64_t *arg_types, | void **args, int64_t *arg_sizes, int64_t *arg_types, | ||||
__tgt_async_info *async_info_ptr); | __tgt_async_info *async_info_ptr); | ||||
extern int target_data_update(DeviceTy &Device, int32_t arg_num, | extern int target_data_update(DeviceTy &Device, int32_t arg_num, | ||||
void **args_base, void **args, int64_t *arg_sizes, int64_t *arg_types); | void **args_base, void **args, int64_t *arg_sizes, int64_t *arg_types); | ||||
Lint: Pre-merge checks clang-tidy: error: unknown type name 'DeviceTy' [clang-diagnostic-error] Lint: Pre-merge checks: clang-tidy: error: unknown type name 'DeviceTy' [clang-diagnostic-error]
[[https://github. | |||||
extern int target(int64_t device_id, void *host_ptr, int32_t arg_num, | extern int target(int64_t device_id, void *host_ptr, int32_t arg_num, | ||||
void **args_base, void **args, int64_t *arg_sizes, int64_t *arg_types, | void **args_base, void **args, int64_t *arg_sizes, int64_t *arg_types, | ||||
int32_t team_num, int32_t thread_limit, int IsTeamConstruct); | int32_t team_num, int32_t thread_limit, int IsTeamConstruct); | ||||
extern int CheckDeviceAndCtors(int64_t device_id); | extern int CheckDeviceAndCtors(int64_t device_id); | ||||
// enum for OMP_TARGET_OFFLOAD; keep in sync with kmp.h definition | // enum for OMP_TARGET_OFFLOAD; keep in sync with kmp.h definition | ||||
Show All 20 Lines | |||||
// components are dynamically decided, so we utilize C++ STL vector | // components are dynamically decided, so we utilize C++ STL vector | ||||
// implementation here. | // implementation here. | ||||
struct MapperComponentsTy { | struct MapperComponentsTy { | ||||
std::vector<MapComponentInfoTy> Components; | std::vector<MapComponentInfoTy> Components; | ||||
}; | }; | ||||
//////////////////////////////////////////////////////////////////////////////// | //////////////////////////////////////////////////////////////////////////////// | ||||
// implementation for fatal messages | // implementation for fatal messages | ||||
//////////////////////////////////////////////////////////////////////////////// | //////////////////////////////////////////////////////////////////////////////// | ||||
Lint: Pre-merge checks clang-tidy: error: no template named 'vector' in namespace 'std' [clang-diagnostic-error] Lint: Pre-merge checks: clang-tidy: error: no template named 'vector' in namespace 'std' [clang-diagnostic-error]… | |||||
#define FATAL_MESSAGE0(_num, _str) \ | #define FATAL_MESSAGE0(_num, _str) \ | ||||
do { \ | do { \ | ||||
fprintf(stderr, "Libomptarget fatal error %d: %s\n", _num, _str); \ | fprintf(stderr, "Libomptarget fatal error %d: %s\n", _num, _str); \ | ||||
exit(1); \ | fflush(stderr); \ | ||||
abort(); \ | |||||
} while (0) | } while (0) | ||||
#define FATAL_MESSAGE(_num, _str, ...) \ | #define FATAL_MESSAGE(_num, _str, ...) \ | ||||
do { \ | do { \ | ||||
fprintf(stderr, "Libomptarget fatal error %d:" _str "\n", _num, \ | fprintf(stderr, "Libomptarget fatal error %d:" _str "\n", _num, \ | ||||
__VA_ARGS__); \ | __VA_ARGS__); \ | ||||
Lint: Pre-merge checks clang-tidy: error: unknown type name 'DeviceTy' [clang-diagnostic-error] Lint: Pre-merge checks: clang-tidy: error: unknown type name 'DeviceTy' [clang-diagnostic-error]
[[https://github. | |||||
exit(1); \ | fflush(stderr); \ | ||||
abort(); \ | |||||
} while (0) | } while (0) | ||||
// Implemented in libomp, they are called from within __tgt_* functions. | // Implemented in libomp, they are called from within __tgt_* functions. | ||||
#ifdef __cplusplus | #ifdef __cplusplus | ||||
extern "C" { | extern "C" { | ||||
#endif | #endif | ||||
// functions that extract info from libomp; keep in sync | // functions that extract info from libomp; keep in sync | ||||
int omp_get_default_device(void) __attribute__((weak)); | int omp_get_default_device(void) __attribute__((weak)); | ||||
Show All 21 Lines |
clang-tidy: error: unknown type name 'DeviceTy' [clang-diagnostic-error]
not useful