Back to FabImage Library website
You are here: Start » Function Reference » Benchmarks » BenchmarkCPU
This is Filter Equivalent. This function may be present in generated code, but should not be used in hand-written code.
Header: | STD.h |
---|---|
Namespace: | fil |
Tests CPU performance for simple arithmetic operations
Syntax
void fil::BenchmarkCPU ( bool inUseMultipleCores, double& outScore )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
![]() |
inUseMultipleCores | bool | True | Indicates if all cores of the CPU should be used |
![]() |
outScore | double& | Score is the time of filter execution in milliseconds. Smaller value for faster CPUs. |
Description
Filter performs a simple benchmark of the CPU by adding integer numbers together. All integer numbers from 0 (zero) to one hundred million (100000000) are being added without taking care of overflow. The sum of numbers is irrelevant and is lost, while the time of execution (in milliseconds) is returned.
This filter can be useful for purposes when some program parameters should be dependent on the performance of the CPU.