1. petsc
  2. PETSc
  3. petsc

Commits

Mark Adams  committed 628284d

apparently fixed a overflow bug.

  • Participants
  • Parent commits ee17fca
  • Branches master

Comments (1)

Files changed (1)

File src/ksp/pc/impls/gamg/tools.c

View file
  • Ignore whitespace
  *  GAMGTableCreate
  */
 /* avoid overflow */
-#define GAMG_HASH(key) ((7*key)%a_tab->size)
+#define GAMG_HASH(key) ((((PetscInt)7)*key)%a_tab->size)
 #undef __FUNCT__
 #define __FUNCT__ "GAMGTableCreate"
 PetscErrorCode GAMGTableCreate(PetscInt a_size, GAMGHashTable *a_tab)