Skip to content

Commit

Permalink
defined mode preprocessors
Browse files Browse the repository at this point in the history
- ENABLE_DISTRIBUTION
- ENABLE_MULTITHREADING
- ENABLE_DISTRIBUTION

These names reflect that the compile-time processors _enable_ the corresponding modes but do not enforce required use; deployment can still be chosen at runtime / Qureg instantiation
  • Loading branch information
TysonRayJones committed Jun 9, 2024
1 parent 85b307d commit 61dcd38
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions quest/include/modes.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,36 @@



// ensure all mode flags are defined

#ifndef ENABLE_DISTRIBUTION
#error "Compiler must define ENABLE_DISTRIBUTION"
#endif

#ifndef ENABLE_MULTITHREADING
#error "Compiler must define ENABLE_MULTITHREADING"
#endif

#ifndef ENABLE_GPU_ACCELERATION
#error "Compiler must define ENABLE_GPU_ACCELERATION"
#endif



// ensure all mode flags are valid values

#if ! (ENABLE_DISTRIBUTION == 0 || ENABLE_DISTRIBUTION == 1)
#error "Macro ENABLE_DISTRIBUTION must have value 0 or 1"
#endif

#if ! (ENABLE_MULTITHREADING == 0 || ENABLE_MULTITHREADING == 1)
#error "Macro ENABLE_MULTITHREADING must have value 0 or 1"
#endif

#if ! (ENABLE_GPU_ACCELERATION == 0 || ENABLE_GPU_ACCELERATION == 1)
#error "Macro ENABLE_GPU_ACCELERATION must have value 0 or 1"
#endif



#endif // MODES_H

0 comments on commit 61dcd38

Please sign in to comment.