Adiar  2.1.0
An External Memory Decision Diagram Library
Adiar Kernel

Set up of Adiar and its core settings. More...

Classes

class  adiar::exec_policy
 Settings to dictate the execution of Adiar's algorithms. More...
 

Functions

template<>
const exec_policy::accessadiar::exec_policy::get< exec_policy::access > () const
 Chosen access mode.
 
template<>
const exec_policy::memoryadiar::exec_policy::get< exec_policy::memory > () const
 Chosen memory type.
 
template<>
const exec_policy::quantify::algorithmadiar::exec_policy::get< exec_policy::quantify::algorithm > () const
 Chosen quantification strategy.
 
template<>
const exec_policy::quantify::transposition_growthadiar::exec_policy::get< exec_policy::quantify::transposition_growth > () const
 Chosen quantification strategy.
 
template<>
const exec_policy::quantify::transposition_maxadiar::exec_policy::get< exec_policy::quantify::transposition_max > () const
 Chosen quantification strategy.
 

Package Initialisation

After having linked the C++ source file with Adiar, one needs to include the <adiar/adiar.h> header, initialise the library before using any of its data structures, and finally remember to deinitialise the library again before the program terminates.

constexpr size_t adiar::minimum_memory = 128 * 1024 * 1024
 Minimum value of 128 MiB for the memory limit.
 
void adiar::adiar_init (size_t memory_limit_bytes, std::string temp_dir="")
 Initiates Adiar with the given amount of memory (given in bytes) More...
 
bool adiar::adiar_initialized () noexcept
 Whether Adiar is initialized.
 
void adiar::adiar_deinit ()
 Closes and cleans up everything by Adiar. More...
 

Version Number

constexpr unsigned short adiar::version_major = 2
 Major version of Adiar.
 
constexpr unsigned short adiar::version_minor = 1
 Minor version of Adiar.
 
constexpr unsigned short adiar::version_patch = 0
 Patch version of Adiar.
 
constexpr unsigned short adiar::version = (version_major * 10'000) + (version_minor*100) + version_patch
 Combined version number of Adiar into a single integer. More...
 
constexpr std::string_view adiar::version_string = "2.1.0"
 A pre-formatted string for version of the Adiar version.
 

Detailed Description

Set up of Adiar and its core settings.

Function Documentation

◆ adiar_deinit()

void adiar::adiar_deinit ( )

Closes and cleans up everything by Adiar.

Warning
All of Adiar's file objects must be destructed before this functions i called. That is, any bdd bdd_builder, zdd zdd_builder or any shared_file objects you may be using.
Exceptions
runtime_errorIf compiled with debug and one of Adiar's objects have not been destructed.

◆ adiar_init()

void adiar::adiar_init ( size_t  memory_limit_bytes,
std::string  temp_dir = "" 
)

Initiates Adiar with the given amount of memory (given in bytes)

Parameters
memory_limit_bytesThe amount of internal memory (in bytes) that Adiar is allowed to use. This has to be at least minimum_memory.
temp_dirThe directory in which to place all temporary files. Default on Linux is the ‍/tmp library.
Exceptions
invalid_argumentIf memory_limit_bytes is set to a value less than the minimum_memory required.
runtime_errorIf adiar_init() and then adiar_deinit() have been called previously.

Variable Documentation

◆ version

constexpr unsigned short adiar::version = (version_major * 10'000) + (version_minor*100) + version_patch
constexpr

Combined version number of Adiar into a single integer.

The each part of the version number is encoded as two decimal digits. That is, it is MMmmpp where M is the Major, m is the minor, and p is the patch version. This can be used to ensure at compile-time whether Adiar's version is within a desired range.