Gromacs  2024.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
int64_to_int.h File Reference
#include "gromacs/utility/futil.h"
+ Include dependency graph for int64_to_int.h:
+ This graph shows which files directly or indirectly include this file:

Description

Low-level utility for converting 64 bit int to int (the size of which is hardware dependent), printing a warning if an overflow will occur.

Functions

int int64_to_int (int64_t step, const char *warn)
 Convert a int64_t value to int. More...
 

Function Documentation

int int64_to_int ( int64_t  step,
const char *  warn 
)

Convert a int64_t value to int.

Parameters
[in]stepThe step number (or other int64)
[in]warnIf warn!=NULL a warning message will be written to stderr when step does not fit in an int, the first line is: "WARNING during %s:", where warn is printed in s.
Returns
the truncated step number.