Learn R Programming

ProFit (version 1.3.3)

profitBenchmarkResultBest: 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.

See Also

profitBenchmark, profitSetupData

Examples

Run this code
# 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))
# }

Run the code above in your browser using DataLab