make signed char explicit
This commit is contained in:
parent
2da6662e99
commit
a0fabd4b32
@ -161,7 +161,7 @@ void Domain::initialize( std::shared_ptr<Database> db )
|
|||||||
// Fill remaining variables
|
// Fill remaining variables
|
||||||
N = Nx*Ny*Nz;
|
N = Nx*Ny*Nz;
|
||||||
Volume = nx*ny*nx*nproc[0]*nproc[1]*nproc[2]*1.0;
|
Volume = nx*ny*nx*nproc[0]*nproc[1]*nproc[2]*1.0;
|
||||||
id = new char[N];
|
id = new signed char[N];
|
||||||
memset(id,0,N);
|
memset(id,0,N);
|
||||||
BoundaryCondition = d_db->getScalar<int>("BC");
|
BoundaryCondition = d_db->getScalar<int>("BC");
|
||||||
int nprocs;
|
int nprocs;
|
||||||
|
@ -170,7 +170,7 @@ public: // Public variables (need to create accessors instead)
|
|||||||
int *recvList_xY, *recvList_yZ, *recvList_Xz, *recvList_XY, *recvList_YZ, *recvList_XZ;
|
int *recvList_xY, *recvList_yZ, *recvList_Xz, *recvList_XY, *recvList_YZ, *recvList_XZ;
|
||||||
//......................................................................................
|
//......................................................................................
|
||||||
// Solid indicator function
|
// Solid indicator function
|
||||||
char *id;
|
signed char *id;
|
||||||
|
|
||||||
void ReadIDs();
|
void ReadIDs();
|
||||||
void CommunicateMeshHalo(DoubleArray &Mesh);
|
void CommunicateMeshHalo(DoubleArray &Mesh);
|
||||||
@ -179,8 +179,8 @@ public: // Public variables (need to create accessors instead)
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void PackID(int *list, int count, char *sendbuf, char *ID);
|
void PackID(int *list, int count, signed char *sendbuf, signed char *ID);
|
||||||
void UnpackID(int *list, int count, char *recvbuf, char *ID);
|
void UnpackID(int *list, int count, signed char *recvbuf, signed char *ID);
|
||||||
void CommHaloIDs();
|
void CommHaloIDs();
|
||||||
|
|
||||||
//......................................................................................
|
//......................................................................................
|
||||||
|
@ -352,7 +352,7 @@ void ScaLBL_Communicator::D3Q19_MapRecv(int Cqx, int Cqy, int Cqz, int *list, i
|
|||||||
delete [] ReturnDist;
|
delete [] ReturnDist;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ScaLBL_Communicator::MemoryOptimizedLayoutAA(IntArray &Map, int *neighborList, char *id, int Np){
|
int ScaLBL_Communicator::MemoryOptimizedLayoutAA(IntArray &Map, int *neighborList, signed char *id, int Np){
|
||||||
/*
|
/*
|
||||||
* Generate a memory optimized layout
|
* Generate a memory optimized layout
|
||||||
* id[n] == 0 implies that site n should be ignored (treat as a mask)
|
* id[n] == 0 implies that site n should be ignored (treat as a mask)
|
||||||
|
@ -158,7 +158,7 @@ public:
|
|||||||
int FirstInterior();
|
int FirstInterior();
|
||||||
int LastInterior();
|
int LastInterior();
|
||||||
|
|
||||||
int MemoryOptimizedLayoutAA(IntArray &Map, int *neighborList, char *id, int Np);
|
int MemoryOptimizedLayoutAA(IntArray &Map, int *neighborList, signed char *id, int Np);
|
||||||
// void MemoryOptimizedLayout(IntArray &Map, int *neighborList, char *id, int Np);
|
// void MemoryOptimizedLayout(IntArray &Map, int *neighborList, char *id, int Np);
|
||||||
// void MemoryOptimizedLayoutFull(IntArray &Map, int *neighborList, char *id, int Np);
|
// void MemoryOptimizedLayoutFull(IntArray &Map, int *neighborList, char *id, int Np);
|
||||||
// void MemoryDenseLayout(IntArray &Map, int *neighborList, char *id, int Np);
|
// void MemoryDenseLayout(IntArray &Map, int *neighborList, char *id, int Np);
|
||||||
|
@ -57,7 +57,7 @@ public:
|
|||||||
std::shared_ptr<Database> analysis_db;
|
std::shared_ptr<Database> analysis_db;
|
||||||
|
|
||||||
IntArray Map;
|
IntArray Map;
|
||||||
char *id;
|
signed char *id;
|
||||||
int *NeighborList;
|
int *NeighborList;
|
||||||
int *dvcMap;
|
int *dvcMap;
|
||||||
double *fq, *Aq, *Bq;
|
double *fq, *Aq, *Bq;
|
||||||
|
@ -115,8 +115,8 @@ int main(int argc, char **argv)
|
|||||||
printf("Input media: %s\n",Filename.c_str());
|
printf("Input media: %s\n",Filename.c_str());
|
||||||
printf("Relabeling %lu values\n",ReadValues.size());
|
printf("Relabeling %lu values\n",ReadValues.size());
|
||||||
for (int idx=0; idx<ReadValues.size(); idx++){
|
for (int idx=0; idx<ReadValues.size(); idx++){
|
||||||
char oldvalue=ReadValues[idx];
|
int oldvalue=ReadValues[idx];
|
||||||
char newvalue=WriteValues[idx];
|
int newvalue=WriteValues[idx];
|
||||||
printf("oldvalue=%d, newvalue =%d \n",oldvalue,newvalue);
|
printf("oldvalue=%d, newvalue =%d \n",oldvalue,newvalue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user