示例#1
0
unsigned int global_checksum(Float * float_p, int len) {
  static int initted = 0;
  unsigned int locsum;

#ifdef UNIFORM_SEED_TESTING
  locsum = test_checksum(float_p,len);
#else
  locsum = local_checksum(float_p, len);
#if 1
  glb_sum_internal2(&locsum,4,0); // 0 for XOR
#else
  if (!initted)
  if (sizeof(unsigned int) != sizeof(unsigned long))
    ERR.General("","global_checksum",
    "sizeof(unsigned int)(%d) != sizeof(unsigned long)(%d)\n",
    sizeof(unsigned int),sizeof(unsigned long));
  QMP_xor_ulong ((unsigned long*)&locsum);
#endif
#endif
  initted=1;
  return locsum;
}
示例#2
0
void DML_global_xor(uint32_t *x){
  unsigned long work = (unsigned long)*x;
  QMP_xor_ulong(&work);
  *x = (uint32_t)work;
}