.. _program_listing_file_include_flamegpu_exception_FLAMEGPUDeviceException.cuh: Program Listing for File FLAMEGPUDeviceException.cuh ==================================================== |exhale_lsh| :ref:`Return to documentation for file ` (``include/flamegpu/exception/FLAMEGPUDeviceException.cuh``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #ifndef INCLUDE_FLAMEGPU_EXCEPTION_FLAMEGPUDEVICEEXCEPTION_CUH_ #define INCLUDE_FLAMEGPU_EXCEPTION_FLAMEGPUDEVICEEXCEPTION_CUH_ #include #include #include "flamegpu/simulation/detail/CUDAScanCompaction.h" #if !defined(FLAMEGPU_SEATBELTS) || FLAMEGPU_SEATBELTS #include "flamegpu/exception/FLAMEGPUDeviceException_device.cuh" namespace flamegpu { namespace exception { class DeviceExceptionManager { public: DeviceExceptionManager(); ~DeviceExceptionManager(); DeviceExceptionBuffer *getDevicePtr(unsigned int streamId, cudaStream_t stream); void checkError(const std::string &function, unsigned int streamId, cudaStream_t stream); private: static std::string getLocationString(const DeviceExceptionBuffer &b); static std::string getErrorString(const DeviceExceptionBuffer &b); DeviceExceptionBuffer *d_buffer[detail::CUDAScanCompaction::MAX_STREAMS]; DeviceExceptionBuffer hd_buffer[detail::CUDAScanCompaction::MAX_STREAMS]; }; } // namespace exception } // namespace flamegpu #else #define DTHROW(nop) #endif // FLAMEGPU_SEATBELTS=OFF #endif // INCLUDE_FLAMEGPU_EXCEPTION_FLAMEGPUDEVICEEXCEPTION_CUH_