Skip to content

Commit

Permalink
dirsplit/dirflip: use constexpr rather than MACRO for defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
jdtournier committed Nov 28, 2019
1 parent af51eef commit a6611bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions cmd/dirflip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
#include "thread.h"
#include "dwi/directions/file.h"

#define DEFAULT_PERMUTATIONS 100000000
constexpr size_t default_permutations = 1e8;



using namespace MR;
Expand Down Expand Up @@ -153,7 +154,7 @@ void run ()
{
auto directions = DWI::Directions::load_cartesian (argument[0]);

size_t num_permutations = get_option_value<size_t> ("permutations", DEFAULT_PERMUTATIONS);
size_t num_permutations = get_option_value<size_t> ("permutations", default_permutations);

vector<int> signs;
{
Expand Down
4 changes: 2 additions & 2 deletions cmd/dirsplit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "thread.h"
#include "dwi/directions/file.h"

#define DEFAULT_PERMUTATIONS 100000000
constexpr size_t default_permutations = 1e8;


using namespace MR;
Expand Down Expand Up @@ -170,7 +170,7 @@ void run ()
if (num_subsets == 1)
throw Exception ("Directions must be split across two or more output files");

const size_t num_permutations = get_option_value<size_t> ("permutations", DEFAULT_PERMUTATIONS);
const size_t num_permutations = get_option_value<size_t> ("permutations", default_permutations);

vector<vector<size_t>> best;
{
Expand Down

0 comments on commit a6611bd

Please sign in to comment.