3#ifndef TURBO_CONFIG_HPP
4#define TURBO_CONFIG_HPP
6#include "battery/allocator.hpp"
7#include "battery/string.hpp"
14#define SUBPROBLEMS_POWER 12
28template<
class Allocator>
102 template <
class Alloc2>
125 printf(
"%s -t %" PRIu64
" %s-n %" PRIu64
" %s%s%s%s%s",
146 printf(
"-arch cpu -p %" PRIu64
" ",
or_nodes);
149 printf(
"-version %s ",
version.data());
152 printf(
"-hardware \"%s\" ",
hardware.data());
173 printf(
"%%%%%%mzn-stat: problem_path=\"%s\"\n",
problem_path.data());
174 printf(
"%%%%%%mzn-stat: solver=\"Turbo\"\n");
175 printf(
"%%%%%%mzn-stat: version=\"%s\"\n", (
version.size() == 0) ?
"1.2.3" :
version.data());
176 printf(
"%%%%%%mzn-stat: hardware=\"%s\"\n", (
hardware.size() == 0) ?
"Intel Core i9-10900X@3.7GHz;24GO DDR4;NVIDIA RTX A5000" :
hardware.data());
178 printf(
"%%%%%%mzn-stat: free_search=\"%s\"\n",
free_search ?
"yes" :
"no");
179 printf(
"%%%%%%mzn-stat: or_nodes=%" PRIu64
"\n",
or_nodes);
180 printf(
"%%%%%%mzn-stat: timeout_ms=%" PRIu64
"\n",
timeout_ms);
182 printf(
"%%%%%%mzn-stat: and_nodes=%" PRIu64
"\n",
and_nodes);
183 printf(
"%%%%%%mzn-stat: stack_size=%" PRIu64
"\n",
stack_kb * 1000);
185 printf(
"%%%%%%mzn-stat: cuda_version=%d\n", CUDA_VERSION);
188 printf(
"%%%%%%mzn-stat: cuda_architecture=%d\n", __CUDA_ARCH__);
202 printf(
"ERROR: Unknown input format for the file %s [supported extension: .xml and .fzn].\n",
problem_path.data());
Arch
Definition config.hpp:17
Configuration< battery::standard_allocator > parse_args(int argc, char **argv)
#define STACK_KB
Definition config.hpp:15
#define SUBPROBLEMS_POWER
Definition config.hpp:14
InputFormat
Definition config.hpp:23
void usage_and_exit(const std::string &program_name)
size_t stop_after_n_nodes
Definition config.hpp:33
battery::string< allocator_type > problem_path
Definition config.hpp:46
CUDA InputFormat input_format() const
Definition config.hpp:194
bool print_intermediate_solutions
Definition config.hpp:31
bool print_ast
Definition config.hpp:37
CUDA void print_mzn_statistics() const
Definition config.hpp:172
bool verbose_solving
Definition config.hpp:36
Arch arch
Definition config.hpp:45
size_t timeout_ms
Definition config.hpp:40
size_t or_nodes
Definition config.hpp:41
CUDA Configuration< allocator_type > & operator=(const Configuration< Alloc2 > &other)
Definition config.hpp:103
size_t stop_after_n_solutions
Definition config.hpp:32
size_t stack_kb
Definition config.hpp:44
CUDA Configuration(const allocator_type &alloc=allocator_type{})
Definition config.hpp:50
CUDA Configuration(const Configuration< Alloc > &other, const allocator_type &alloc=allocator_type{})
Definition config.hpp:81
Configuration(const Configuration< allocator_type > &)=default
bool noatomics
Definition config.hpp:39
bool free_search
Definition config.hpp:34
bool only_global_memory
Definition config.hpp:38
CUDA void print_commandline(const char *program_name)
Definition config.hpp:124
battery::string< allocator_type > hardware
Definition config.hpp:48
Allocator allocator_type
Definition config.hpp:30
bool print_statistics
Definition config.hpp:35
size_t and_nodes
Definition config.hpp:42
CUDA const char * name_of_arch(Arch arch) const
Definition config.hpp:158
Configuration(Configuration< allocator_type > &&)=default
battery::string< allocator_type > version
Definition config.hpp:47
size_t subproblems_power
Definition config.hpp:43