mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-24 04:15:11 +00:00
nvidia/cuda: Add function to query version directly
This commit is contained in:
parent
f316e0aa70
commit
47ef5dd995
2 changed files with 10 additions and 0 deletions
|
@ -238,6 +238,13 @@ nvidia::cuda::cuda::cuda() : _library()
|
|||
cuInit(0);
|
||||
}
|
||||
|
||||
int32_t nvidia::cuda::cuda::version()
|
||||
{
|
||||
int32_t v = 0;
|
||||
cuDriverGetVersion(&v);
|
||||
return v;
|
||||
}
|
||||
|
||||
std::shared_ptr<nvidia::cuda::cuda> nvidia::cuda::cuda::get()
|
||||
{
|
||||
static std::weak_ptr<nvidia::cuda::cuda> instance;
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
#pragma once
|
||||
#include <cstddef>
|
||||
#include <tuple>
|
||||
#include "util/util-bitmask.hpp"
|
||||
#include "util/util-library.hpp"
|
||||
|
||||
|
@ -181,6 +182,8 @@ namespace nvidia::cuda {
|
|||
~cuda();
|
||||
cuda();
|
||||
|
||||
int32_t version();
|
||||
|
||||
public:
|
||||
// Initialization
|
||||
CUDA_DEFINE_FUNCTION(cuInit, int32_t flags);
|
||||
|
|
Loading…
Reference in a new issue