[go: nahoru, domu]

Skip to content

Commit

Permalink
Fix casting issue
Browse files Browse the repository at this point in the history
  • Loading branch information
romeric committed May 1, 2020
1 parent a7d9b73 commit 820b5bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Fastor/tensor/IndexRetriever.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ FASTOR_INLINE size_t get_flat_index(Args ... args) const {
constexpr size_t DimensionHolder[Dimension] = {Rest...};

for (size_t i=0; i<Dimension; ++i) {
if (largs[i]==-1) largs[i] += DimensionHolder[i];
if ( largs[i] < 0 ) largs[i] += DimensionHolder[i];
#if FASTOR_BOUNDS_CHECK
FASTOR_ASSERT( (largs[i]>=0 && largs[i]<DimensionHolder[i]), "INDEX OUT OF BOUNDS");
#endif
Expand Down
4 changes: 2 additions & 2 deletions Fastor/tensor_algebra/permutation.h
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,8 @@ struct extractor_perm<Index<Idx...> > {
// typename std_ext::make_index_sequence<sizeof...(Idx)>::type>::index_type;
constexpr auto& maxes_idx = permute_impl<T,Index<Idx...>, tensor_type,
typename std_ext::make_index_sequence<sizeof...(Idx)>::type>::index_type::_IndexHolder;
constexpr auto& maxes_out = permute_impl<T,Index<Idx...>, tensor_type,
typename std_ext::make_index_sequence<sizeof...(Idx)>::type>::maxes_out_type::_IndexHolder;
// constexpr auto& maxes_out = permute_impl<T,Index<Idx...>, tensor_type,
// typename std_ext::make_index_sequence<sizeof...(Idx)>::type>::maxes_out_type::_IndexHolder;

constexpr int a_dim = DIMS;
constexpr int out_dim = a_dim;
Expand Down

0 comments on commit 820b5bf

Please sign in to comment.