12 #include "HYPRE_config.h"
15 #ifdef HYPRE_RELEASE_VERSION
16 #define HYPRE_VERSION_STRING HYPRE_RELEASE_VERSION
17 #elif defined(HYPRE_PACKAGE_VERSION)
18 #define HYPRE_VERSION_STRING HYPRE_PACKAGE_VERSION
22 #define STR_EXPAND(s) #s
23 #define STR(s) STR_EXPAND(s)
29 #ifdef HYPRE_VERSION_STRING
30 const char *ptr = STR(HYPRE_VERSION_STRING);
31 if (*ptr ==
'"') { ptr++; }
33 for (
int i = 0; i < 3; i++, ptr++)
36 for (
char d; d = *ptr,
'0' <= d && d <=
'9'; ptr++)
38 pv = 10*pv + (d -
'0');
39 if (pv >= 100) {
return 1; }
41 version = 100*version + pv;
43 printf(
"%i\n", version);