SOPT
Sparse OPTimisation
Macros | Functions
common_catch_main.cc File Reference
#include "sopt/config.h"
#include <catch2/catch_all.hpp>
#include <memory>
#include <random>
#include "sopt/logging.h"
+ Include dependency graph for common_catch_main.cc:

Go to the source code of this file.

Macros

#define CATCH_CONFIG_RUNNER
 

Functions

std::unique_ptr< std::mt19937_64 > mersenne (new std::mt19937_64(0))
 
int main (int argc, char const **argv)
 

Macro Definition Documentation

◆ CATCH_CONFIG_RUNNER

#define CATCH_CONFIG_RUNNER

Definition at line 1 of file common_catch_main.cc.

Function Documentation

◆ main()

int main ( int  argc,
char const **  argv 
)

Definition at line 11 of file common_catch_main.cc.

11  {
12  Catch::Session session; // There must be exactly once instance
13 
14  int const returnCode = session.applyCommandLine(argc, const_cast<char **>(argv));
15  if (returnCode != 0) // Indicates a command line error
16  return returnCode;
17  mersenne.reset(new std::mt19937_64(session.configData().rngSeed));
18 
19  return session.run();
20 }
std::unique_ptr< std::mt19937_64 > mersenne(new std::mt19937_64(0))

References mersenne().

◆ mersenne()

std::unique_ptr<std::mt19937_64> mersenne ( new   std::mt19937_640)