| 25 | namespace cuda { |
| 26 | |
| 27 | common::Version getCusparseVersion(const LibHandle& handle) { |
| 28 | std::function<cusparseStatus_t(libraryPropertyType, int*)> fptr( |
| 29 | reinterpret_cast<cusparseStatus_t (*)(libraryPropertyType, int*)>( |
| 30 | common::getFunctionPointer(handle, "cusparseGetProperty"))); |
| 31 | |
| 32 | int major, minor, patch; |
| 33 | CUSPARSE_CHECK(fptr(MAJOR_VERSION, &major)); |
| 34 | CUSPARSE_CHECK(fptr(MINOR_VERSION, &minor)); |
| 35 | CUSPARSE_CHECK(fptr(PATCH_LEVEL, &patch)); |
| 36 | |
| 37 | Version out{major, minor, patch}; |
| 38 | return out; |
| 39 | } |
| 40 | |
| 41 | cusparseModule::cusparseModule() |
| 42 | : |
nothing calls this directly
no test coverage detected