Einsums/RuntimeConfiguration/RuntimeConfiguration.hpp#

Defined in header Einsums/RuntimeConfiguration/RuntimeConfiguration.hpp.

See Overview for a list of names and headers that are part of the public Einsums API.

namespace einsums

Todo:

Functions

void register_arguments(std::function<void(argparse::ArgumentParser&)>)#
struct RuntimeConfiguration#
#include <RuntimeConfiguration.hpp>

Handles the current configuration state of the running instance.

Currently, defaults are handled in pre_initialize. Eventually, some kind of configuration file will be implemented that will override the defaults set in pre_initialize.

The current instance of the RuntimeConfiguration can be obtained from Runtime::config() or from runtime_config() functions.

Public Functions

RuntimeConfiguration(int argc, char const *const *argv, std::function<void(argparse::ArgumentParser&)> const &user_command_line = {})#

Constructor of the runtime configuration object of einsums.

Parameters:
  • argc – the argc argument from main

  • argv – the argv argument from main

  • user_command_line – callback function that can be used to register additional command-line options

explicit RuntimeConfiguration(std::vector<std::string> const &argv, std::function<void(argparse::ArgumentParser&)> const &user_command_line = {})#

Constructor of the runtime configuration object of einsums. This is used when argv has been packaged into a vector.

Parameters:
  • argv – The argv that has been packaged up.

  • user_command_line – callback function that can be used to register additional command-line options

RuntimeConfiguration() = delete#

Public Members

std::vector<std::string> original#

Todo:

Document.

std::unique_ptr<argparse::ArgumentParser> argument_parser#

Holds the parser used to parse the arguments passed to Einsums.

Private Functions

void pre_initialize()#

Currently sets reasonable defaults for the development of Einsums.

std::vector<std::string> parse_command_line(std::function<void(argparse::ArgumentParser&)> const &user_command_line = {})#

Parse the command line arguments provided in argc and argv. Returns unknown command line arguments.