biod.pnpi.spb.ru
/
alexxy
/
gromacs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge "Merge branch release-4-6 into master"
[alexxy/gromacs.git]
/
src
/
gromacs
/
legacyheaders
/
maths.h
diff --git
a/src/gromacs/legacyheaders/maths.h
b/src/gromacs/legacyheaders/maths.h
index 567119624b489ece0f85d1a970f5ec65d3f617fa..efbfdaebbe97f9862e8a0b1f158ae9c92846cd6a 100644
(file)
--- a/
src/gromacs/legacyheaders/maths.h
+++ b/
src/gromacs/legacyheaders/maths.h
@@
-170,6
+170,18
@@
check_int_multiply_for_overflow(gmx_large_int_t a,
gmx_large_int_t b,
gmx_large_int_t *result);
+static int gmx_greatest_common_divisor(int p, int q)
+{
+ int tmp;
+ while (q != 0)
+ {
+ tmp = q;
+ q = p % q;
+ p = tmp;
+ }
+ return p;
+}
+
#ifdef __cplusplus
}
#endif