HPCToolkit
gpu_ctxt_actions.c File Reference
#include <messages/messages.h>
#include "gpu_ctxt_actions.h"
#include <cuda.h>
#include <cuda_runtime.h>
#include <lib/prof-lean/atomic.h>
#include "gpu_blame-cuda-runtime-header.h"
#include "gpu_blame-cuda-driver-header.h"
Include dependency graph for gpu_ctxt_actions.c:

Go to the source code of this file.

Classes

struct  cuda_ctxt_t
 

Macros

#define Cuda_RTcall(fn)   cudaRuntimeFunctionPointer[fn ## Enum].fn ## Real
 
#define Cuda_Dcall(fn)   cuDriverFunctionPointer[fn ## Enum].fn ## Real
 

Functions

void cuda_ncontexts_reset (void)
 
uint64_t cuda_ncontexts_incr (void)
 
uint64_t cuda_ncontexts_decr (void)
 
cuda_ctxt_tcuda_capture_ctxt (void)
 
void cuda_set_ctxt (cuda_ctxt_t *ctxt)
 
void * cuda_get_handle (cuda_ctxt_t *ctxt)
 

Variables

static uint64_t ncontexts = 0L
 
struct cuda_ctxt_t local_ctxt
 

Macro Definition Documentation

◆ Cuda_Dcall

#define Cuda_Dcall (   fn)    cuDriverFunctionPointer[fn ## Enum].fn ## Real

Definition at line 11 of file gpu_ctxt_actions.c.

◆ Cuda_RTcall

#define Cuda_RTcall (   fn)    cudaRuntimeFunctionPointer[fn ## Enum].fn ## Real

Definition at line 10 of file gpu_ctxt_actions.c.

Function Documentation

◆ cuda_capture_ctxt()

cuda_ctxt_t* cuda_capture_ctxt ( void  )

Definition at line 55 of file gpu_ctxt_actions.c.

◆ cuda_get_handle()

void* cuda_get_handle ( cuda_ctxt_t ctxt)

Definition at line 77 of file gpu_ctxt_actions.c.

◆ cuda_ncontexts_decr()

uint64_t cuda_ncontexts_decr ( void  )

Definition at line 43 of file gpu_ctxt_actions.c.

◆ cuda_ncontexts_incr()

uint64_t cuda_ncontexts_incr ( void  )

Definition at line 36 of file gpu_ctxt_actions.c.

◆ cuda_ncontexts_reset()

void cuda_ncontexts_reset ( void  )

Definition at line 30 of file gpu_ctxt_actions.c.

◆ cuda_set_ctxt()

void cuda_set_ctxt ( cuda_ctxt_t ctxt)

Definition at line 66 of file gpu_ctxt_actions.c.

Variable Documentation

◆ local_ctxt

struct cuda_ctxt_t local_ctxt

◆ ncontexts

uint64_t ncontexts = 0L
static

Definition at line 26 of file gpu_ctxt_actions.c.