Skip to content

Commit

Permalink
Delete commented code.
Browse files Browse the repository at this point in the history
  • Loading branch information
timspainNERSC committed Nov 14, 2024
1 parent 09750cd commit 5216f7b
Showing 1 changed file with 0 additions and 35 deletions.
35 changes: 0 additions & 35 deletions core/src/ModelArraySlice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,41 +47,6 @@ ModelArraySlice& ModelArraySlice::operator=(ModelArray& ma)
{
copyBetweenMAandMASlice(ma, *this, true, "ModelArraySlice::operator=(ModelArray)");
return *this;
// // Shape check
// Slice::SliceIter thisIter(slice, data.dimensions());
//
// // The slice needs to have at least as many dimensions as the ModelArray
// for (size_t dim = 0; dim < ma.nDimensions(); ++dim) {
// if (thisIter.nElements(dim) != ma.dimensions()[dim])
// throw std::domain_error("ModelArraySlice::operator=(ModelArray): shape mismatch.");
// }
// // But any extra dimensions must have length 1
// if (slice.n() > ma.nDimensions()) {
// for (size_t dim = ma.nDimensions(); dim < slice.n(); ++dim) {
// if (thisIter.nElements(dim) != 1)
// throw std::domain_error("ModelArraySlice::operator=(ModelArray): additional dimensions must have length 1.");
// }
// }
//
// Slice::Bounds all = {{}, {}};
// Slice::Bounds first = {0};
// Slice::VBounds bounds;
// bounds.resize(slice.n());
// Slice::SliceIter::MultiDim extendedDims;
// extendedDims.resize(slice.n());
// for (size_t dim = 0; dim < ma.nDimensions(); ++dim) {
// bounds[dim] = all;
// extendedDims[dim] = ma.dimensions()[dim];
// }
// for (size_t dim = ma.nDimensions(); dim < slice.n(); ++dim) {
// bounds[dim] = first;
// extendedDims[dim] = 1;
// }
//
// Slice sourceSlice(bounds);
// Slice::SliceIter sourceIter(sourceSlice, extendedDims);
// copySliceWithIters(ma, sourceIter, data, thisIter);
// return *this;
}

ModelArray& ModelArraySlice::copyToModelArray(ModelArray& target) const
Expand Down

0 comments on commit 5216f7b

Please sign in to comment.