Commit dcbbaf0b authored by mattijs's avatar mattijs

COMP: label64: fixes #1297.

parent 4e6eee74
......@@ -173,7 +173,7 @@ int main(int argc, char *argv[])
DynamicList<label> globalIDs;
for (label i = 0; i < 100; i++)
{
globalIDs.append(rndGen.position(0, nTotalCells-1));
globalIDs.append(rndGen.position(label(0), nTotalCells-1));
}
// Get the cell centres at those cell indices
......
Subproject commit 3e147ba27a59e6dc008c7d32cbebfd29f58b5a36
Subproject commit fdf0f40d7a24c7b08c255ba2ee05ecbb847cc264
Subproject commit de0f98f42f1c6fd648689fb10176657e3ff4e87c
Subproject commit 566968cae355bd15bdfcc133a04c886af604075f
......@@ -226,12 +226,12 @@ public:
//- Collect data in processor order on master (== procIDs[0]).
// Needs offsets only on master.
template<class Type>
template<class Container, class Type>
static void gather
(
const labelUList& offsets,
const label comm,
const labelList& procIDs,
const Container& procIDs,
const UList<Type>& fld,
List<Type>& allFld,
const int tag = UPstream::msgType(),
......@@ -241,11 +241,11 @@ public:
//- Collect data in processor order on master (== procIDs[0]).
// Needs offsets only on master.
template<class Type>
template<class Container, class Type>
void gather
(
const label comm,
const labelList& procIDs,
const Container& procIDs,
const UList<Type>& fld,
List<Type>& allFld,
const int tag = UPstream::msgType(),
......@@ -283,12 +283,12 @@ public:
//- Inplace collect in processor order on master (== procIDs[0]).
//- Needs offsets only on master.
template<class Type>
template<class Container, class Type>
static void gather
(
const labelUList& offsets,
const label comm,
const labelList& procIDs,
const Container& procIDs,
List<Type>& fld,
const int tag = UPstream::msgType(),
const Pstream::commsTypes commsType =
......@@ -297,11 +297,11 @@ public:
//- Inplace collect in processor order on master (== procIDs[0]).
//- Needs offsets only on master.
template<class Type>
template<class Container, class Type>
void gather
(
const label comm,
const labelList& procIDs,
const Container& procIDs,
List<Type>& fld,
const int tag = UPstream::msgType(),
const Pstream::commsTypes commsType =
......@@ -337,12 +337,12 @@ public:
//- Distribute data in processor order. Requires fld to be sized!
template<class Type>
template<class Container, class Type>
static void scatter
(
const labelUList& offsets,
const label comm,
const labelList& procIDs,
const Container& procIDs,
const UList<Type>& allFld,
UList<Type>& fld,
const int tag = UPstream::msgType(),
......@@ -351,11 +351,11 @@ public:
);
//- Distribute data in processor order. Requires fld to be sized!
template<class Type>
template<class Container, class Type>
void scatter
(
const label comm,
const labelList& procIDs,
const Container& procIDs,
const UList<Type>& allFld,
UList<Type>& fld,
const int tag = UPstream::msgType(),
......
......@@ -29,12 +29,12 @@ License
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>
template<class Container, class Type>
void Foam::globalIndex::gather
(
const labelUList& off,
const label comm,
const labelList& procIDs,
const Container& procIDs,
const UList<Type>& fld,
List<Type>& allFld,
const int tag,
......@@ -193,7 +193,7 @@ void Foam::globalIndex::gather
gather
(
UPstream::worldComm,
identity(Pstream::nProcs(UPstream::worldComm)),
UPstream::procID(UPstream::worldComm),
fld,
allFld,
tag,
......@@ -215,12 +215,12 @@ void Foam::globalIndex::gatherOp
}
template<class Type>
template<class Container, class Type>
void Foam::globalIndex::gather
(
const labelUList& off,
const label comm,
const labelList& procIDs,
const Container& procIDs,
List<Type>& fld,
const int tag,
const Pstream::commsTypes commsType
......@@ -250,7 +250,7 @@ void Foam::globalIndex::gather
gather
(
UPstream::worldComm,
identity(Pstream::master(UPstream::worldComm)),
UPstream::procID(UPstream::worldComm),
fld,
allFld,
tag,
......@@ -280,12 +280,12 @@ void Foam::globalIndex::gatherOp
}
template<class Type>
template<class Container, class Type>
void Foam::globalIndex::scatter
(
const labelUList& off,
const label comm,
const labelList& procIDs,
const Container& procIDs,
const UList<Type>& allFld,
UList<Type>& fld,
const int tag,
......@@ -452,7 +452,7 @@ void Foam::globalIndex::scatter
(
offsets_,
UPstream::worldComm,
identity(Pstream::nProcs(UPstream::worldComm)),
UPstream::procID(UPstream::worldComm),
allFld,
fld,
tag,
......
......@@ -34,8 +34,8 @@ License
Foam::sliceRange::sliceRange(const FixedList<label,3>& coeffs)
:
start_(coeffs[0]),
size_(std::max(0,coeffs[1])), // No negative size
stride_(std::max(0,coeffs[2])) // No negative stride
size_(std::max(label(0),coeffs[1])), // No negative size
stride_(std::max(label(0),coeffs[2])) // No negative stride
{}
......
......@@ -43,8 +43,8 @@ inline Foam::sliceRange::sliceRange
) noexcept
:
start_(start),
size_(std::max(0,size)), // No negative size
stride_(std::max(0,stride)) // No negative stride
size_(std::max(label(0),size)), // No negative size
stride_(std::max(label(0),stride)) // No negative stride
{}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment