Skip to content

Commit

Permalink
[CUDA] Windows fix for CUPTIAPI
Browse files Browse the repository at this point in the history
Fixes the `CUPTIAPI` specifier for CUPTI function pointers on Windows.
  • Loading branch information
ProGTX committed Mar 1, 2024
1 parent 8499b57 commit cb6d98f
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions source/adapters/cuda/tracing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@
using tracing_event_t = xpti_td *;
using subscriber_handle_t = CUpti_SubscriberHandle;

using cuptiSubscribe_fn = CUPTIAPI
CUptiResult (*)(CUpti_SubscriberHandle *subscriber, CUpti_CallbackFunc callback,
void *userdata);
using cuptiSubscribe_fn =
CUptiResult(CUPTIAPI *)(CUpti_SubscriberHandle *subscriber,
CUpti_CallbackFunc callback, void *userdata);

using cuptiUnsubscribe_fn = CUPTIAPI
CUptiResult (*)(CUpti_SubscriberHandle subscriber);
using cuptiUnsubscribe_fn =
CUptiResult(CUPTIAPI *)(CUpti_SubscriberHandle subscriber);

using cuptiEnableDomain_fn = CUPTIAPI
CUptiResult (*)(uint32_t enable, CUpti_SubscriberHandle subscriber,
CUpti_CallbackDomain domain);
using cuptiEnableDomain_fn =
CUptiResult(CUPTIAPI *)(uint32_t enable, CUpti_SubscriberHandle subscriber,
CUpti_CallbackDomain domain);

using cuptiEnableCallback_fn = CUPTIAPI
CUptiResult (*)(uint32_t enable, CUpti_SubscriberHandle subscriber,
CUpti_CallbackDomain domain, CUpti_CallbackId cbid);
using cuptiEnableCallback_fn =
CUptiResult(CUPTIAPI *)(uint32_t enable, CUpti_SubscriberHandle subscriber,
CUpti_CallbackDomain domain, CUpti_CallbackId cbid);

#define LOAD_CUPTI_SYM(p, lib, x) \
p.x = (cupti##x##_fn)ur_loader::LibLoader::getFunctionPtr(lib.get(), \
Expand Down

0 comments on commit cb6d98f

Please sign in to comment.