Function flamegpu::detail::cuda::cuDevicePrimaryContextIsActive

Function Documentation

inline bool flamegpu::detail::cuda::cuDevicePrimaryContextIsActive(int ordinal)

Use the cuda Driver API to check that the primary context for a given device (the device which is shared with the runtime API) is active. This method will silenty absorb any cuda driver api errors, as it’s intended use case is when the cuda driver may be uninitlaised / shutdown.

Parameters:

ordinal – device index to query for

Returns:

bool indicating if primary context for the given device is active or not