diff --git a/src/cupoch/utility/platform.cu b/src/cupoch/utility/platform.cu index ae67d2db..fa806d44 100644 --- a/src/cupoch/utility/platform.cu +++ b/src/cupoch/utility/platform.cu @@ -51,6 +51,12 @@ int GetDevice() { void SetDevice(int device_no) { cudaSetDevice(device_no); } +void GetDeviceProp(cudaDeviceProp& prop, int device_no) { + int cp_device_no = device_no; + if (cp_device_no < 0) cp_device_no = GetDevice(); + cudaSafeCall(cudaGetDeviceProperties(&prop, cp_device_no)); +} + void Error(const char *error_string, const char *file, const int line, diff --git a/src/cupoch/utility/platform.h b/src/cupoch/utility/platform.h index e9aaec22..f75298c3 100644 --- a/src/cupoch/utility/platform.h +++ b/src/cupoch/utility/platform.h @@ -53,6 +53,8 @@ int GetDevice(); void SetDevice(int device_no); +void GetDeviceProp(cudaDeviceProp& prop, int device_no = -1); + void Error(const char *error_string, const char *file, const int line, diff --git a/src/cupoch/version.txt b/src/cupoch/version.txt index 8e30c6cd..341eb466 100644 --- a/src/cupoch/version.txt +++ b/src/cupoch/version.txt @@ -1,4 +1,4 @@ CUPOCH_VERSION_MAJOR 0 CUPOCH_VERSION_MINOR 2 -CUPOCH_VERSION_PATCH 5 +CUPOCH_VERSION_PATCH 6 CUPOCH_VERSION_TWEAK 0 diff --git a/src/python/pyproject.toml b/src/python/pyproject.toml index 4ef98b0e..48d83f19 100644 --- a/src/python/pyproject.toml +++ b/src/python/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cupoch" -version = "0.2.5.0" +version = "0.2.6.0" description = "" authors = ["nekanat "] license = "MIT"