|
PBeFS
Parallel Best-First Search
|
Header file for the small helpers shared by the searches: a stopwatch, the placement of the workers on the CPUs and their run on an executor, a prefetch, and the random numbers of the workers; the mixing of the bits of a word, the backoff of the waiting workers, the placement on the CPUs and the allocator of huge pages are those of ADS. More...
#include <algorithm>#include <chrono>#include <cstddef>#include <cstdint>#include <cstdlib>#include <vector>#include "ADS/concurrent/Backoff.h"#include "ADS/dictionary/RandomHashing.h"#include "ADS/memory/HugePageAllocator.h"#include "ADS/parallel/Affinity.h"#include "ADS/parallel/Executor.h"#include "ADS/parallel/ThreadPool.h"Go to the source code of this file.
Classes | |
| struct | ParallelParams |
| the parameters shared by the parallel searches More... | |
| class | Stopwatch |
| a wall-clock stopwatch, started at construction More... | |
Namespaces | |
| namespace | PBeFS_di_unipi_it |
| namespace for the Parallel Best-First Search library | |
Functions | |
| void | pin_worker (unsigned i) noexcept |
| pins the calling thread to the i-th CPU it may run on, if PBEFS_PIN is set | |
| template<ADS::WorkerExecutor Executor, class F> | |
| void | run_workers (Executor *ex, unsigned p, F &&f) |
| runs the workers f( 0 ) , ... , f( p - 1 ) at once on an Executor | |
| void | prefetch (const void *p) noexcept |
| hints the processor to bring the cache line of p in, for reading | |
| template<class Gen> | |
| double | random_unit (Gen &gen) |
| a real number in [ 0 , 1 ) from the next word of a 64-bit generator | |
| template<class Gen> | |
| std::uint64_t | random_below (Gen &gen, std::uint64_t n) |
| an integer in [ 0 , n ) from the next word of a 64-bit generator, n > 0 | |
Variables | |
| constexpr std::size_t | cache_line = 64 |
| the size of a cache line, used to keep the data of the workers apart | |
Header file for the small helpers shared by the searches: a stopwatch, the placement of the workers on the CPUs and their run on an executor, a prefetch, and the random numbers of the workers; the mixing of the bits of a word, the backoff of the waiting workers, the placement on the CPUs and the allocator of huge pages are those of ADS.