Difference between pages "r7.1.1:Building Guide (testing)" and "r7.1.1:Define BENCHMARK PAL MEMORY TYPE"

From liblfds.org
(Difference between pages)
Jump to navigation Jump to search
m (1 revision imported)
 
m (1 revision imported)
 
Line 1: Line 1:
{{DISPLAYTITLE:Building Guide (testing)}}
{{DISPLAYTITLE:define BENCHMARK_PAL_MEMORY_TYPE}}
==Introducton==
==Source File==
Each data structure is provided with a range of tests. These tests are implemented in a library, ''libtest'', which offers a small and simple API, so it can be used on arbitrary platforms.  The ''libtest'' library depends on ''liblfds'' itself and also on a third library, ''libshared''.  Finally, a convenience thin command line veneer, ''test'', is provided, which is used from the command line to run the test suite and see the results.
  └───test_and_benchmark
    └───benchmark
        └───src
            └───libbenchmark_porting_abstraction_layer_operating_system.h


It is intended that ''libtest'' and ''libshared'' will target bare C89 implementations. This is not yet the case. The ''libtest'' library still requires a hosted implementation, as it calls ''time'', and ''libshared'' where it provides an abstraction for starting and waiting for threads, depends on threads.
==Define==
  #define BENCHMARK_PAL_OS_STRING BENCHMARK_MEMORY_TYPE_SMP
or
#define BENCHMARK_PAL_OS_STRING  BENCHMARK_MEMORY_TYPE_NUMA


Building guides exist for all these components.
==Example==
#define BENCHMARK_PAL_OS_STRING  BENCHMARK_MEMORY_TYPE_NUMA


* [[r7.1.1:Building Guide (liblfds)|Building Guide (liblfds)]]
==Optionality==
* [[r7.1.1:Building Guide (libshared)|Building Guide (libshared)]]
This define is mandatory. The programme will compile if it is not set, but it will fail to run, as no memory allocations will occur.
* [[r7.1.1:Building Guide (libtest)|Building Guide (libtest)]]
 
* [[r7.1.1:Building Guide (test)|Building Guide (test)]]
==Notes==
This define indicates whether the platform is SMP or NUMA. It's not a good solution to this need - this information can and already partially is in fact be provided through the makefile - but the ''benchmark'' programme was never intended to be ported by end-users, and so the porting abstraction layer is a bit of an afterthought. Given the complexty of the ''libbenchmark'' API, what will possibly happen in the next release is that users will not access the ''libbenchmark'' API, but, rather, ''benchmark'' will be given a proper porting abstraction layer, and it will be the main way users port benchmarking functionality.


==See Also==
==See Also==
* [[r7.1.1:Release_7.1.1_Documentation|Release 7.1.1 Documentation]]
* [[r7.1.1:Porting Guide (benchmark)|Porting Guide (benchmark)]]

Latest revision as of 20:16, 17 February 2017

Source File

└───test_and_benchmark
    └───benchmark
        └───src
            └───libbenchmark_porting_abstraction_layer_operating_system.h

Define

#define BENCHMARK_PAL_OS_STRING  BENCHMARK_MEMORY_TYPE_SMP

or

#define BENCHMARK_PAL_OS_STRING  BENCHMARK_MEMORY_TYPE_NUMA

Example

#define BENCHMARK_PAL_OS_STRING  BENCHMARK_MEMORY_TYPE_NUMA

Optionality

This define is mandatory. The programme will compile if it is not set, but it will fail to run, as no memory allocations will occur.

Notes

This define indicates whether the platform is SMP or NUMA. It's not a good solution to this need - this information can and already partially is in fact be provided through the makefile - but the benchmark programme was never intended to be ported by end-users, and so the porting abstraction layer is a bit of an afterthought. Given the complexty of the libbenchmark API, what will possibly happen in the next release is that users will not access the libbenchmark API, but, rather, benchmark will be given a proper porting abstraction layer, and it will be the main way users port benchmarking functionality.

See Also