profitBenchmarkResultBest: Return best integration/convolution method from a...

View source: R/profitBenchmark.R

profitBenchmarkResultBestR Documentation

Return best integration/convolution method from a profitBenchmark result.

Description

This function will return the best method from a benchmark result returned by profitBenchmark.

Usage

profitBenchmarkResultBest(result, precision="double")

Arguments

result

A benchmarking result returned from profitBenchmark.

precision

The desired floating-point precision; either "single" or "double" (the default).

Value

List; complex structure containing:

convolver

Pointer to the best profitConvolver; see profitMakeConvolver.

dev_name

The name of the best device.

name

The name of the best method and/or OpenCL environment.

openclenv

Pointer to the best OpenCL environment; see profitOpenCLEnv.

precision

The floating point precision (from precision).

time

The time per operation for the best method in ms.

usecalcregion

Logical; whether the optimal method uses the calcregion matrix or not; see profitSetupData.

Author(s)

Dan Taranu

See Also

profitBenchmark, profitSetupData

Examples

## Not run: 
img = profitMakeGaussianPSF()
bench=profitBenchmark(img, psf=img, nbench=1L, methods=profitAvailableConvolvers())
print(profitBenchmarkResultStripPointers(bench$result)[
  c("name","env_name","version","dev_name",paste0("tinms.mean_",c("single","double")))])
best = profitBenchmarkResultBest(bench$result)
print(paste('Name:',best$name,'time:',best$time))

## End(Not run)

ICRAR/ProFit documentation built on Feb. 1, 2024, 9:34 a.m.