Gromacs  2026.0-dev-20250422-b697545
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Functions | Variables
binaryinformation.cpp File Reference
#include "gmxpre.h"
#include "gromacs/utility/binaryinformation.h"
#include "config.h"
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <array>
#include <filesystem>
#include <numeric>
#include <string>
#include <unordered_map>
#include <vector>
#include "gromacs/utility/arraysize.h"
#include "gromacs/utility/baseversion.h"
#include "gromacs/utility/exceptions.h"
#include "gromacs/utility/gmxassert.h"
#include "gromacs/utility/path.h"
#include "gromacs/utility/programcontext.h"
#include "gromacs/utility/stringutil.h"
#include "gromacs/utility/sysinfo.h"
#include "gromacs/utility/textwriter.h"
#include "buildinfo.h"
#include "contributors.h"
+ Include dependency graph for binaryinformation.cpp:

Description

Implements functionality for printing information about the currently running binary.

Classes

class  gmx::BinaryInformationRegistry::Impl
 Impl class for BinaryInformationRegistry. More...
 

Functions

int anonymous_namespace{binaryinformation.cpp}::centeringOffset (int width, int length)
 
std::string anonymous_namespace{binaryinformation.cpp}::formatCentered (int width, const char *text)
 
void anonymous_namespace{binaryinformation.cpp}::writeVectorAsColumns (gmx::TextWriter *writer, const std::string &header, const std::vector< std::string > &v, std::size_t outputWidth=80)
 
void anonymous_namespace{binaryinformation.cpp}::writeVectorAsSingleLine (gmx::TextWriter *writer, const std::string &header, const std::vector< std::string > &v, std::size_t outputWidth=80)
 
void anonymous_namespace{binaryinformation.cpp}::printCopyright (gmx::TextWriter *writer)
 
BinaryInformationRegistry & gmx::globalBinaryInformationRegistry ()
 Returns global instance for modules to use when registering.
 
void gmx::anonymous_namespace{binaryinformation.cpp}::writeLineFromRegistry (TextWriter *writer, const std::string &label)
 Helper function for writing binary information from the registry.
 
void gmx::anonymous_namespace{binaryinformation.cpp}::writeOptionalLineFromRegistry (TextWriter *writer, const std::string &label)
 Helper function for writing optional binary information from the registry.
 
void gmx::anonymous_namespace{binaryinformation.cpp}::writeExtendedInfo (gmx::TextWriter *writer)
 
void gmx::printBinaryInformation (FILE *fp, const IProgramContext &programContext, const BinaryInformationSettings &settings)
 Print basic information about the executable with custom settings. More...
 
void gmx::printBinaryInformation (TextWriter *writer, const IProgramContext &programContext, const BinaryInformationSettings &settings)
 Print basic information about the executable with custom settings. More...
 

Variables

const int gmx::anonymous_namespace{binaryinformation.cpp}::sc_maxWidthOfLabelColumn = 20
 
static const bool s_registeredBinaryInformation
 

Variable Documentation

const bool s_registeredBinaryInformation
static
Initial value:
= []()
{
registry.insert("Precision", GMX_DOUBLE ? "double" : "mixed");
registry.insert("Memory model",
gmx::formatString("%u bit", static_cast<unsigned>(CHAR_BIT * sizeof(void*))));
registry.insert("C compiler", BUILD_C_COMPILER);
registry.insert("C compiler flags", std::string(BUILD_CFLAGS) + " " + CMAKE_BUILD_CONFIGURATION_C_FLAGS);
registry.insert("C++ compiler", BUILD_CXX_COMPILER);
registry.insert("C++ compiler flags",
std::string(BUILD_CXXFLAGS) + " " + CMAKE_BUILD_CONFIGURATION_CXX_FLAGS);
registry.insert("Tracing support", "disabled");
return true;
}()
BinaryInformationRegistry & globalBinaryInformationRegistry()
Returns global instance for modules to use when registering.
Definition: binaryinformation.cpp:223
Central location where modules can describe themselves.
Definition: binaryinformation.h:55
void insert(const std::string &label, const std::string &value)
Inserts value into the registry at label label.
Definition: binaryinformation.cpp:199