Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions offload/include/OffloadPolicy.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ enum kmp_target_offload_kind_t {
tgt_mandatory = 2
};

extern "C" int __kmpc_get_target_offload(void) __attribute__((weak));

class OffloadPolicy {

OffloadPolicy(PluginManager &PM) {
Expand Down
21 changes: 17 additions & 4 deletions offload/include/OpenMP/InternalTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,23 @@ typedef struct kmp_task {
int32_t part_id;
} kmp_task_t;

int32_t __kmpc_global_thread_num(void *) __attribute__((weak));
bool __kmpc_omp_has_task_team(int32_t gtid) __attribute__((weak));
void **__kmpc_omp_get_target_async_handle_ptr(int32_t gtid)
__attribute__((weak));
// Implemented in libomp, they are called from within __tgt_* functions.
int32_t __kmpc_global_thread_num(void *);
bool __kmpc_omp_has_task_team(int32_t gtid);
void **__kmpc_omp_get_target_async_handle_ptr(int32_t gtid);
int __kmpc_get_target_offload(void);
kmp_task_t *
__kmpc_omp_target_task_alloc(ident_t *loc_ref, int32_t gtid, int32_t flags,
size_t sizeof_kmp_task_t, size_t sizeof_shareds,
kmp_routine_entry_t task_entry, int64_t device_id);
int32_t __kmpc_omp_task_with_deps(ident_t *loc_ref, int32_t gtid,
kmp_task_t *new_task, int32_t ndeps,
kmp_depend_info_t *dep_list,
int32_t ndeps_noalias,
kmp_depend_info_t *noalias_dep_list);
void __kmpc_omp_wait_deps(ident_t *loc_ref, int32_t gtid, int32_t ndeps,
kmp_depend_info_t *dep_list, int32_t ndeps_noalias,
kmp_depend_info_t *noalias_dep_list);

/**
* The argument set that is passed from asynchronous memory copy to block
Expand Down
2 changes: 1 addition & 1 deletion offload/include/OpenMP/omp.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ typedef void *omp_depend_t;
/// API declarations
///{

int omp_get_default_device(void) __attribute__((weak));
int omp_get_default_device(void);

///}

Expand Down
23 changes: 0 additions & 23 deletions offload/libomptarget/OpenMP/API.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,29 +48,6 @@ void *targetLockExplicit(void *HostPtr, size_t Size, int DeviceNum,
const char *Name);
void targetUnlockExplicit(void *HostPtr, int DeviceNum, const char *Name);

// Implemented in libomp, they are called from within __tgt_* functions.
extern "C" {
int __kmpc_get_target_offload(void) __attribute__((weak));
kmp_task_t *__kmpc_omp_task_alloc(ident_t *loc_ref, int32_t gtid, int32_t flags,
size_t sizeof_kmp_task_t,
size_t sizeof_shareds,
kmp_routine_entry_t task_entry)
__attribute__((weak));

kmp_task_t *
__kmpc_omp_target_task_alloc(ident_t *loc_ref, int32_t gtid, int32_t flags,
size_t sizeof_kmp_task_t, size_t sizeof_shareds,
kmp_routine_entry_t task_entry, int64_t device_id)
__attribute__((weak));

int32_t __kmpc_omp_task_with_deps(ident_t *loc_ref, int32_t gtid,
kmp_task_t *new_task, int32_t ndeps,
kmp_depend_info_t *dep_list,
int32_t ndeps_noalias,
kmp_depend_info_t *noalias_dep_list)
__attribute__((weak));
}

EXTERN int omp_get_num_devices(void) {
TIMESCOPE();
OMPT_IF_BUILT(ReturnAddressSetterRAII RA(__builtin_return_address(0)));
Expand Down
8 changes: 0 additions & 8 deletions offload/libomptarget/OpenMP/InteropAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@
#include <cstdlib>
#include <cstring>

extern "C" {

void __kmpc_omp_wait_deps(ident_t *loc_ref, int32_t gtid, int32_t ndeps,
kmp_depend_info_t *dep_list, int32_t ndeps_noalias,
kmp_depend_info_t *noalias_dep_list);

} // extern "C"

namespace {
omp_interop_rc_t getPropertyErrorType(omp_interop_property_t Property) {
switch (Property) {
Expand Down
Loading