Skip to content

Commit

Permalink
Remove redundant order trait.
Browse files Browse the repository at this point in the history
`boxtensor_storage_order` and `boxrange_iteration_order` implementations are identical. Combine the definitions to eliminate redundant code.
  • Loading branch information
justusc committed Apr 16, 2024
1 parent 20167a3 commit 231cc34
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions btas/tensor_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,8 @@ class is_boxtensor {

/// checks _Tensor meets the TWG.BoxTensor concept requirements
template<class _Tensor>
class boxtensor_storage_order {
public:
enum {row_major = boxrange_iteration_order<typename _Tensor::range_type>::row_major,
other = boxrange_iteration_order<typename _Tensor::range_type>::other,
column_major = boxrange_iteration_order<typename _Tensor::range_type>::column_major
};
static constexpr const int
value = boxrange_iteration_order<typename _Tensor::range_type>::value;
};
class boxtensor_storage_order : public boxrange_iteration_order<typename _Tensor::range_type> {};


} // namespace btas

Expand Down

0 comments on commit 231cc34

Please sign in to comment.