Skip to content

Commit

Permalink
Only check for uninit VectorD in debug mode
Browse files Browse the repository at this point in the history
Change the check for uninitialized VectorD from
a usage check to an internal check. This has a
large effect on performance since it is called
a lot by any restraint that works on coordinates.
Relates #963.
  • Loading branch information
benmwebb committed Feb 1, 2024
1 parent 622d856 commit 979f9ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/algebra/include/VectorBaseD.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ class VectorBaseD : public GeometricPrimitiveD<D> {
}

void check_vector() const {
IMP_USAGE_CHECK(!data_.get_is_null(),
"Attempt to use uninitialized vector.");
IMP_INTERNAL_CHECK(!data_.get_is_null(),
"Attempt to use uninitialized vector.");
}
template <int OD>
void check_compatible_vector(const VectorBaseD<OD> &o) const {
Expand Down

0 comments on commit 979f9ff

Please sign in to comment.