You are here: Start » All Functions » Benchmarks » BenchmarkCPU
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: | avl |
Tests CPU performance for simple arithmetic operations.
Applications: Can be used if some functions of your application may be available only on high-performance computers.
Syntax
void avl::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.