/
cuml_utils.R
48 lines (46 loc) · 1.28 KB
/
cuml_utils.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#' Determine whether {cuda.ml} was linked to a valid version of the RAPIDS cuML
#' shared library.
#'
#' @return A logical value indicating whether the current installation {cuda.ml}
#' was linked to a valid version of the RAPIDS cuML shared library.
#'
#' @examples
#'
#' library(cuda.ml)
#'
#' if (!has_cuML()) {
#' warning(
#' "Please install the RAPIDS cuML shared library first, and then re-",
#' "install {cuda.ml}."
#' )
#' }
#' @export
has_cuML <- .has_cuML
#' Get the major version of the RAPIDS cuML shared library {cuda.ml} was linked
#' to.
#'
#' @return The major version of the RAPIDS cuML shared library {cuda.ml} was
#' linked to in a character vector, or \code{NA_character_} if {cuda.ml} was not
#' linked to any version of RAPIDS cuML.
#'
#' @examples
#'
#' library(cuda.ml)
#'
#' print(cuML_major_version())
#' @export
cuML_major_version <- .cuML_major_version
#' Get the minor version of the RAPIDS cuML shared library {cuda.ml} was linked
#' to.
#'
#' @return The minor version of the RAPIDS cuML shared library {cuda.ml} was
#' linked to in a character vector, or \code{NA_character_} if {cuda.ml} was not
#' linked to any version of RAPIDS cuML.
#'
#' @examples
#'
#' library(cuda.ml)
#'
#' print(cuML_minor_version())
#' @export
cuML_minor_version <- .cuML_minor_version