R/precision.R

Defines functions .precision

# The precision argument every GPU function takes. Single precision is the
# default: it is what the package has always computed in, and consumer GPUs
# run it many times faster than double.
.precision <- function(precision)
{
	if (!is.character(precision) || length(precision) != 1L ||
	    !(precision %in% c("single", "double"))) {
		stop("precision must be \"single\" or \"double\"")
	}
	precision
}

Try the gputools package in your browser

Any scripts or data that you put into this service are public.

gputools documentation built on Oct. 24, 2026, 5:07 p.m.