Use int64_t everywhere for flash id
This commit is contained in:
parent
b8ca531987
commit
6003121c64
@ -226,7 +226,7 @@ void h5_read_flash3_particles (H5File* file,
|
|||||||
float *vel1,
|
float *vel1,
|
||||||
float *vel2,
|
float *vel2,
|
||||||
float *vel3,
|
float *vel3,
|
||||||
long *id)
|
int64_t *id)
|
||||||
{
|
{
|
||||||
|
|
||||||
herr_t status;
|
herr_t status;
|
||||||
@ -381,7 +381,7 @@ void h5_read_flash3_particles (H5File* file,
|
|||||||
|
|
||||||
if (id) {
|
if (id) {
|
||||||
for(p=0; p < (pcount); p++) {
|
for(p=0; p < (pcount); p++) {
|
||||||
id[p+poffset] = (long) *(partBuffer+iptag-1+p*numProps);
|
id[p+poffset] = (int64_t) *(partBuffer+iptag-1+p*numProps);
|
||||||
} }
|
} }
|
||||||
|
|
||||||
if (pos1 && pos2 && pos3) {
|
if (pos1 && pos2 && pos3) {
|
||||||
|
@ -52,6 +52,7 @@ This file has been developped by P. M. Sutter.
|
|||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include "H5Cpp.h"
|
#include "H5Cpp.h"
|
||||||
#include "hdf5_flash.h"
|
#include "hdf5_flash.h"
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
using namespace H5;
|
using namespace H5;
|
||||||
|
|
||||||
@ -73,7 +74,7 @@ void h5_read_flash3_particles (H5File* file,
|
|||||||
float *vel1,
|
float *vel1,
|
||||||
float *vel2,
|
float *vel2,
|
||||||
float *vel3,
|
float *vel3,
|
||||||
long *id);
|
int64_t *id);
|
||||||
|
|
||||||
void h5_read_flash3_header_info(H5File* file,
|
void h5_read_flash3_header_info(H5File* file,
|
||||||
double* time, /* simulation time */
|
double* time, /* simulation time */
|
||||||
|
@ -106,7 +106,7 @@ SimuData *CosmoTool::loadFlashMulti(const char *fname, int id, int loadflags)
|
|||||||
} }
|
} }
|
||||||
|
|
||||||
if (loadflags & NEED_GADGET_ID) {
|
if (loadflags & NEED_GADGET_ID) {
|
||||||
data->Id = new long[data->NumPart];
|
data->Id = new int64_t[data->NumPart];
|
||||||
if (data->Id == 0) {
|
if (data->Id == 0) {
|
||||||
delete data;
|
delete data;
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user