Gromacs  2022.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
compare.h File Reference
#include <cstdio>
#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/basedefinitions.h"
#include "gromacs/utility/real.h"
+ Include dependency graph for compare.h:

Description

Utilities for comparing data structures (for gmx check).

Functions

gmx_bool equal_real (real i1, real i2, real ftol, real abstol)
 Compares two real values for equality.
 
gmx_bool equal_float (float i1, float i2, float ftol, float abstol)
 Compares two float values for equality.
 
gmx_bool equal_double (double i1, double i2, real ftol, real abstol)
 Compares two double values for equality.
 
void cmp_int (FILE *fp, const char *s, int index, int i1, int i2)
 Compares two integers and prints differences.
 
void cmp_int64 (FILE *fp, const char *s, int64_t i1, int64_t i2)
 Compares two 64-bit integers and prints differences.
 
void cmp_us (FILE *fp, const char *s, int index, unsigned short i1, unsigned short i2)
 Compares two unsigned short values and prints differences.
 
void cmp_uc (FILE *fp, const char *s, int index, unsigned char i1, unsigned char i2)
 Compares two unsigned char values and prints differences.
 
gmx_bool cmp_bool (FILE *fp, const char *s, int index, gmx_bool b1, gmx_bool b2)
 Compares two boolean values and prints differences, and returns whether both are true.
 
void cmp_str (FILE *fp, const char *s, int index, const char *s1, const char *s2)
 Compares two strings and prints differences.
 
void cmp_real (FILE *fp, const char *s, int index, real i1, real i2, real ftol, real abstol)
 Compares two reals and prints differences.
 
void cmp_float (FILE *fp, const char *s, int index, float i1, float i2, float ftol, float abstol)
 Compares two floats and prints differences.
 
void cmp_double (FILE *fp, const char *s, int index, double i1, double i2, double ftol, double abstol)
 Compares two doubles and prints differences.
 
template<typename EnumType >
void cmpEnum (FILE *fp, const char *s, EnumType value1, EnumType value2)
 Compare two enums of generic type and print differences.