Skip to content

Sequence configuration

Daniel Campora Perez requested to merge dcampora_configure_sequence into master

Huge overhaul to allow sequence configurations to be specified in a simple manner. Now, it is possible to just edit the ConfiguredSequence.cuh file to determine what will be executed in the sequence.

  • Handlers have been reworked. Upon writing a new CUDA algorithm, a line like ALGORITHM(function_name, exposed_type_name) is expected. function_name refers to the name of the __global__ CUDA function, and the exposed_type_name must be a unique identifier to refer to that algorithm. Several identifiers can be specified for the same function, allowing reutilization of an algorithm (ie. Prefix sum).
  • StreamVisitor implements a visitor pattern for all algorithms. (This will allow us to move to using std::variant whenever nvcc supports C++17). Each algorithm must have a StreamVisitor::visit override, where the arguments are set, the scheduler is prepared, and the algorithm itself is invoked. Specializations to StreamVisitor::visit live in the folder sequence_visitors, with a subfolder for each subdetector, for ease of configuration.
  • The tediously long StreamSequence has effectively been replaced by the above visitor pattern, who visits the sequence tuple.
  • Geometry constants have been moved into the Constants object. This may have to be revisited in the future if geometry turns out to change too often.
  • A new singleton RuntimeOptions encapsulates all runtime options. It is passed to the visit functions, const.
  • A new singleton HostBuffers holds all pinned host buffers. It is also passed to the visit functions, non const.
  • Monte Carlo check is performed out of the loop, so it doesn't affect timing anymore.
Edited by Daniel Campora Perez

Merge request reports