Skip to content

Commit

Permalink
empty coordsets should identify only as index types
Browse files Browse the repository at this point in the history
Otherwise attempts to apply vector type forward passes will fail due to
incorrect sizing
  • Loading branch information
dkoes committed Sep 20, 2019
1 parent c1749bd commit 176b37b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/libmolgrid/coordinateset.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ struct CoordinateSet {
template <bool isCUDA>
size_t copyTo(Grid<float, 2, isCUDA>& c, Grid<float, 2, isCUDA>& t, Grid<float, 1, isCUDA>& r) const;

/// return true if index types are available
/// return true if index types are available (or if empty)
bool has_indexed_types() const { return type_index.size() > 0 || type_vector.size() == 0; }

/// return true if vector types are available
bool has_vector_types() const { return type_vector.size() > 0 || type_index.size() == 0; }
bool has_vector_types() const { return type_vector.size() > 0; }

/** \brief convert index types to vector types in-place
* @param include_dummy_type - if true will create an additional type at end (has zero radii if type radii are provided is true)
Expand Down

0 comments on commit 176b37b

Please sign in to comment.