GPU DRP utilities: CUDA error checks, CudaContext, CoreRegisters (GpuAsyncCore registers, real or simulated), DMA target selection and GPUTimer.
More...
#include "psdaq/aes-stream-drivers/GpuAsync.h"
#include "psdaq/aes-stream-drivers/GpuAsyncUser.h"
#include <string>
#include <memory>
#include <assert.h>
#include <stdint.h>
#include <cuda.h>
#include <cuda_runtime.h>
|
| namespace | Drp |
| | This class services detectors whose event data is formatted from the AxiStreamBatcherEventBuilder firmware module This class depends upon the existence of a python module "psdaq.configdb.<detType>_config.py", which contains the following functions: <detType>_init (str) - returns a handle (PyObject) for interacting with the device configuration <detType>_connect (handle) - returns a dictionary with "paddr" element for Xpm link ID.
|
| |
| namespace | Drp::Gpu |
| | Namespace of the GPU DRP code (psdaq/drpGpu); only Gpu::Detector is forward-declared here.
|
| |
|
| #define | deviceFunc |
| | Empty when not compiling with nvcc; device under nvcc.
|
| |
| #define | globalFunc |
| | Empty when not compiling with nvcc; global under nvcc.
|
| |
| #define | hostFunc |
| | Empty when not compiling with nvcc; host under nvcc.
|
| |
| #define | NOARG "" |
| | Empty string literal put in front of the optional message, so that the message argument is never empty (per the code comment).
|
| |
| #define | chkFatal(rc, ...) checkError((rc), #rc, __FILE__, __LINE__, true, NOARG __VA_ARGS__) |
| | Check a CUDA driver or runtime result rc with checkError(), logging any failure with the optional message and aborting.
|
| |
| #define | chkError(rc, ...) checkError((rc), #rc, __FILE__, __LINE__, false, NOARG __VA_ARGS__) |
| | Check a CUDA driver or runtime result rc with checkError(), logging any failure with the optional message without aborting; evaluates to true on failure.
|
| |
|
| bool | Drp::Gpu::checkError (CUresult status, const char *func, const char *file, int line, bool crash=true, const char *msg="") |
| | If status is not CUDA_SUCCESS, log file, line, the error name and description and msg, then abort if crash is true.
|
| |
| bool | Drp::Gpu::checkError (cudaError status, const char *func, const char *file, int line, bool crash=true, const char *msg="") |
| | If status is not cudaSuccess, log file, line, the error name and description and msg, then abort if crash is true.
|
| |
| DmaTgt_t | Drp::Gpu::dmaTgtGet (CoreRegisters &) |
| | Return TGT_CPU or TGT_GPU for the AXI stream demux select value of coreRegs, or TGT_ERR for any other value.
|
| |
| void | Drp::Gpu::dmaTgtSet (CoreRegisters &, DmaTgt_t) |
| | Write tgt to the AXI stream demux select field of coreRegs.
|
| |
| void | Drp::Gpu::dmaIdxReset (CoreRegisters &) |
| | Function to reset the DMA buffer round-robin index.
|
| |
GPU DRP utilities: CUDA error checks, CudaContext, CoreRegisters (GpuAsyncCore registers, real or simulated), DMA target selection and GPUTimer.
◆ chkError
| #define chkError |
( |
|
rc, |
|
|
|
... |
|
) |
| checkError((rc), #rc, __FILE__, __LINE__, false, NOARG __VA_ARGS__) |
Check a CUDA driver or runtime result rc with checkError(), logging any failure with the optional message without aborting; evaluates to true on failure.
◆ chkFatal
| #define chkFatal |
( |
|
rc, |
|
|
|
... |
|
) |
| checkError((rc), #rc, __FILE__, __LINE__, true, NOARG __VA_ARGS__) |
Check a CUDA driver or runtime result rc with checkError(), logging any failure with the optional message and aborting.
◆ deviceFunc
Empty when not compiling with nvcc; device under nvcc.
◆ globalFunc
Empty when not compiling with nvcc; global under nvcc.
◆ hostFunc
Empty when not compiling with nvcc; host under nvcc.
◆ NOARG
Empty string literal put in front of the optional message, so that the message argument is never empty (per the code comment).