kos

What is the difference between this two samples ?

Discussion created by kos on Jan 24, 2009
Latest reply on Jan 24, 2009 by rick.weber

first :

  calResMap((CALvoid**)&fdata, &pitch, outputRes, 0);
  if(!Info.Quiet)
 {
  for (CALint i = 0; i < 8; ++i)
  {
  CALfloat* tmp = &fdata[i * pitch];
  for(CALint j = 0; j < 8; ++j)
  {
  printf("%8.2f ", tmp[j]);
  }
  printf("\n");
  }
 }
  calResUnmap(outputRes);

second :

calResMap((CALvoid**)&fdata, &pitch, outputRes, 0);
calResUnmap(outputRes);
 if(!Info.Quiet)
 {
  for (CALint i = 0; i < 8; ++i)
  {
  CALfloat* tmp = &fdata[i * pitch];
  for(CALint j = 0; j < 8; ++j)
  {
  printf("%8.2f ", tmp[j]);
  }
  printf("\n");
  }
 }

Will second work fine in any case ?

Outcomes