Skip to content

Commit

Permalink
fix: set concurrency model in C++ examples
Browse files Browse the repository at this point in the history
not bothering with Python examples yet, since we need to work on the
bindings...
  • Loading branch information
c-dilks committed Sep 26, 2024
1 parent a29c6df commit decc968
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions examples/iguana_ex_cpp_01_action_functions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ int main(int argc, char** argv)
enum banks_enum { b_particle,
b_config }; // TODO: users shouldn't have to do this

// set the concurrency model to single-threaded, since this example is single-threaded;
// not doing this will use the thread-safe model, `"memoize"`
iguana::GlobalConcurrencyModel = "single";

// create the algorithms
iguana::clas12::EventBuilderFilter algo_eventbuilder_filter;
iguana::clas12::MomentumCorrection algo_momentum_correction;
Expand Down
1 change: 1 addition & 0 deletions src/iguana/algorithms/Algorithm.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include "iguana/algorithms/AlgorithmBoilerplate.h"
#include "iguana/services/YAMLReader.h"
#include <iguana/services/GlobalParam.h>

namespace iguana {

Expand Down
1 change: 0 additions & 1 deletion src/iguana/tests/include/TestAlgorithm.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include <hipo4/reader.h>
#include <iguana/algorithms/AlgorithmSequence.h>
#include <iguana/services/GlobalParam.h>

inline int TestAlgorithm(
std::string command,
Expand Down
1 change: 0 additions & 1 deletion src/iguana/tests/include/TestMultithreading.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include <hipo4/reader.h>
#include <iguana/algorithms/AlgorithmSequence.h>
#include <iguana/services/GlobalParam.h>

inline int TestMultithreading(
std::string const command,
Expand Down

0 comments on commit decc968

Please sign in to comment.