Conversation
|
|
||
| fixture() | ||
| { | ||
| static_assert(shapes.size() == multi_index.size(),""); |
There was a problem hiding this comment.
use unary static_assert when the string literal is an empty string [modernize-unary-static-assert]
static_assert(shapes.size() == multi_index.size(),"");
^ ~~Reported as warning by clang-tidy.
| fixture() | ||
| { | ||
| static_assert(shapes.size() == multi_index.size(),""); | ||
| static_assert(shapes.size() == indexf.size(),""); |
There was a problem hiding this comment.
use unary static_assert when the string literal is an empty string [modernize-unary-static-assert]
static_assert(shapes.size() == indexf.size(),"");
^ ~~Reported as warning by clang-tidy.
| { | ||
| static_assert(shapes.size() == multi_index.size(),""); | ||
| static_assert(shapes.size() == indexf.size(),""); | ||
| static_assert(shapes.size() == indexl.size(),""); |
There was a problem hiding this comment.
use unary static_assert when the string literal is an empty string [modernize-unary-static-assert]
static_assert(shapes.size() == indexl.size(),"");
^ ~~Reported as warning by clang-tidy.
| static_assert(shapes.size() == multi_index.size(),""); | ||
| static_assert(shapes.size() == indexf.size(),""); | ||
| static_assert(shapes.size() == indexl.size(),""); | ||
| static_assert(shapes.size() == ranks.size(),""); |
There was a problem hiding this comment.
use unary static_assert when the string literal is an empty string [modernize-unary-static-assert]
static_assert(shapes.size() == ranks.size(),"");
^ ~~Reported as warning by clang-tidy.
| } | ||
|
|
||
|
|
||
| static inline auto shapes = std::array<extents_t,15> |
There was a problem hiding this comment.
15 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers]
static inline auto shapes = std::array<extents_t,15>
^Reported as warning by clang-tidy.
| } | ||
|
|
||
| /** @brief Returns the span strides of the subtensor */ | ||
| inline auto const& spans () const { |
There was a problem hiding this comment.
function spans should be marked [[nodiscard]] [modernize-use-nodiscard]
inline auto const& spans () const {
^
[[nodiscard]]Reported as warning by clang-tidy.
| }; | ||
|
|
||
|
|
||
| } // namespaces boost::numeric::ublas |
There was a problem hiding this comment.
namespace boost::numeric::ublas ends with an unrecognized comment [google-readability-namespace-comments]
} // namespaces boost::numeric::ublas
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// namespace boost::numeric::ublas
include/boost/numeric/ublas/tensor/subtensor.hpp:26:11: note: namespace 'boost::numeric::ublas' starts here
namespace boost::numeric::ublas {
^Reported as warning by clang-tidy.
| /// \file subtensor_utility.hpp Definition for the tensor template class | ||
|
|
||
| #ifndef _BOOST_NUMERIC_UBLAS_TENSOR_SUBTENSOR_UTILITY_HPP_ | ||
| #define _BOOST_NUMERIC_UBLAS_TENSOR_SUBTENSOR_UTILITY_HPP_ |
There was a problem hiding this comment.
declaration uses identifier _BOOST_NUMERIC_UBLAS_TENSOR_SUBTENSOR_UTILITY_HPP_, which is a reserved identifier [bugprone-reserved-identifier]
#define _BOOST_NUMERIC_UBLAS_TENSOR_SUBTENSOR_UTILITY_HPP_
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
BOOST_NUMERIC_UBLAS_TENSOR_SUBTENSOR_UTILITY_HPP_Reported as warning by clang-tidy.
|
|
||
| if constexpr ( is_sliced ){ | ||
| if(size == 0) return span_type(0 , extent0); | ||
| else if(first== max) return span_type(extent0 , extent0); |
There was a problem hiding this comment.
do not use else after return [readability-else-after-return]
else if(first== max) return span_type(extent0 , extent0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Reported as warning by clang-tidy.
| else { | ||
| size_type step = s.step (); | ||
| if(size == 0) return span_type(0 , size_type(1), extent0); | ||
| else if(first== max) return span_type(extent0 , step, extent0); |
There was a problem hiding this comment.
do not use else after return [readability-else-after-return]
else if(first== max) return span_type(extent0 , step, extent0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Reported as warning by clang-tidy.
87ee607 to
50e19e5
Compare
|
|
||
| using sspan = span<std::size_t>; | ||
|
|
||
| } // namespace |
There was a problem hiding this comment.
namespace boost::numeric::ublas ends with a comment that refers to a wrong namespace `` [google-readability-namespace-comments]
} // namespace
^~~~~~~~~~~~~
// namespace boost::numeric::ublas
include/boost/numeric/ublas/tensor/span.hpp:25:11: note: namespace 'boost::numeric::ublas' starts here
namespace boost::numeric::ublas {
^Reported as warning by clang-tidy.
| BOOST_UBLAS_INLINE | ||
| subtensor (tensor_type& t) | ||
| : super_type () | ||
| , spans_ () |
There was a problem hiding this comment.
initializer for member spans_ is redundant [readability-redundant-member-init]
, spans_ ()
^~~~~~~~~~~~~~~~Reported as warning by clang-tidy.
| } | ||
|
|
||
| template<typename ... span_types> | ||
| subtensor(tensor_type& t, span_types&& ... spans) |
There was a problem hiding this comment.
constructors that are callable with a single argument must be marked explicit to avoid unintentional implicit conversions [hicpp-explicit-conversions]
subtensor(tensor_type& t, span_types&& ... spans)
^
explicitReported as warning by clang-tidy.
| explicit | ||
| subtensor (tensor_type const& t) | ||
| : super_type () | ||
| , spans_ () |
There was a problem hiding this comment.
initializer for member spans_ is redundant [readability-redundant-member-init]
, spans_ ()
^~~~~~~~~~~~~~~~Reported as warning by clang-tidy.
|
|
||
| size_type step = s.step (); | ||
| if(size == 0) return span_type(0 , 1u, extent0); | ||
| else if(first== span_type::max) return span_type(extent0 , step, extent0); |
There was a problem hiding this comment.
do not use else after return [readability-else-after-return]
else if(first== span_type::max) return span_type(extent0 , step, extent0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Reported as warning by clang-tidy.
|
Hi, I just wanted to let you know that I would be interested in trying this feature! |
|
This Pull request Passed all of clang-tidy tests. 👍 |
No description provided.