Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/boost/numeric/ublas/tensor/algorithms.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <functional>
#include <stdexcept>

namespace boost::numeric::ublas {
namespace boost { namespace numeric { namespace ublas {



Expand Down Expand Up @@ -344,7 +344,7 @@ constexpr void trans(SizeType const p,
}


} // namespace boost::numeric::ublas
} } } // namespace boost::numeric::ublas


#endif
6 changes: 3 additions & 3 deletions include/boost/numeric/ublas/tensor/concepts.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include <type_traits>

namespace boost::numeric::ublas{
namespace boost { namespace numeric { namespace ublas{

template<typename T>
concept integral = std::is_integral_v<T>;
Expand All @@ -29,6 +29,6 @@ concept unsigned_integral = integral<T> && !signed_integral<T>;
template<typename T>
concept floating_point = std::is_floating_point_v<T>;

} // namespace boost::numeric::ublas
} } } // namespace boost::numeric::ublas

#endif // BOOST_UBLAS_TENSOR_CONCEPTS_BASIC_HPP
#endif // BOOST_UBLAS_TENSOR_CONCEPTS_HPP
4 changes: 2 additions & 2 deletions include/boost/numeric/ublas/tensor/expression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#include "tags.hpp"

namespace boost::numeric::ublas::detail
namespace boost { namespace numeric { namespace ublas { namespace detail
{

/** @\brief base class for tensor expressions
Expand Down Expand Up @@ -177,6 +177,6 @@ constexpr auto make_unary_tensor_expression( vector_expression<E> const& e, OP o
}


} // namespace boost::numeric::ublas::detail
} } } } // namespace boost::numeric::ublas::detail

#endif // BOOST_UBLAS_TENSOR_EXPRESSIONS_HPP
16 changes: 8 additions & 8 deletions include/boost/numeric/ublas/tensor/expression_evaluation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
#include "type_traits.hpp"


namespace boost::numeric::ublas {
namespace boost { namespace numeric { namespace ublas {

template<class tensor_engine>
class tensor_core;

} // namespace boost::numeric::ublas
} } } // namespace boost::numeric::ublas

namespace boost::numeric::ublas::detail {
namespace boost { namespace numeric { namespace ublas { namespace detail {

template<class T, class D>
struct tensor_expression;
Expand All @@ -41,9 +41,9 @@ struct binary_tensor_expression;
template<class T, class E, class OP>
struct unary_tensor_expression;

} // namespace boost::numeric::ublas::detail
} } } } // namespace boost::numeric::ublas::detail

namespace boost::numeric::ublas::detail {
namespace boost { namespace numeric { namespace ublas { namespace detail {

template<class T, class E>
struct has_tensor_types
Expand All @@ -65,10 +65,10 @@ template<class T, class E, class OP>
struct has_tensor_types<T, unary_tensor_expression<T,E,OP>>
{ static constexpr bool value = std::is_same<T,E>::value || has_tensor_types<T,E>::value; };

} // namespace boost::numeric::ublas::detail
} } } } // namespace boost::numeric::ublas::detail


namespace boost::numeric::ublas::detail
namespace boost { namespace numeric { namespace ublas { namespace detail
{

/** @brief Retrieves extents of the tensor_core
Expand Down Expand Up @@ -158,7 +158,7 @@ constexpr auto& retrieve_extents(unary_tensor_expression<T,E,OP> const& expr)
return retrieve_extents(expr.e);
}

} // namespace boost::numeric::ublas::detail
} } } } // namespace boost::numeric::ublas::detail


///////////////
Expand Down
5 changes: 2 additions & 3 deletions include/boost/numeric/ublas/tensor/extents/extents_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@
#define BOOST_NUMERIC_UBLAS_TENSOR_EXTENTS_BASE_HPP

#include <algorithm>
//#include <concepts>
#include <type_traits>

#include "../concepts.hpp"

namespace boost::numeric::ublas {
namespace boost { namespace numeric { namespace ublas {


template<class D>
Expand Down Expand Up @@ -49,6 +48,6 @@ template <class E> inline static constexpr bool const is_static_v = is_sta
template <class E> inline static constexpr bool const is_dynamic_rank_v = is_dynamic_rank<E>::value;
template <class E> inline static constexpr bool const is_static_rank_v = is_static_rank<E>::value;

} // namespace boost::numeric::ublas
} } } // namespace boost::numeric::ublas

#endif // _BOOST_NUMERIC_UBLAS_TENSOR_EXTENTS_BASE_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "../layout.hpp"
#include "../concepts.hpp"

namespace boost::numeric::ublas {
namespace boost { namespace numeric { namespace ublas {



Expand Down Expand Up @@ -140,7 +140,7 @@ class extents_core<T>
base_type _base;
};

} // namespace boost::numeric::ublas
} } } // namespace boost::numeric::ublas


namespace boost::numeric::ublas{
Expand Down
11 changes: 5 additions & 6 deletions include/boost/numeric/ublas/tensor/extents/extents_functions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@

#include <algorithm>
#include <numeric>
//#include <concepts>

#include "../layout.hpp"
#include "../concepts.hpp"

namespace boost::numeric::ublas
namespace boost { namespace numeric { namespace ublas
{
template<integral T, T...>
class extents_core;
Expand All @@ -40,10 +39,10 @@ template <class D> [[nodiscard]] constexpr inline auto rend (extents_base<D> co
template <class D> [[nodiscard]] constexpr inline auto empty (extents_base<D> const& e) noexcept -> bool { return e().base().empty(); }
template <class D> [[nodiscard]] constexpr inline auto size (extents_base<D> const& e) noexcept -> typename D::size_type { return e().base().size(); }

} //namespace boost::numeric::ublas
} } } //namespace boost::numeric::ublas


namespace boost::numeric::ublas
namespace boost { namespace numeric { namespace ublas
{

/** @brief Returns true if extents equals ([m,n,...,l]) with m>0,n>0,...,l>0 */
Expand Down Expand Up @@ -183,7 +182,7 @@ template<integral T, T n, class L>



} // namespace boost::numeric::ublas
} } } // namespace boost::numeric::ublas


template<boost::numeric::ublas::integral T, T n, T m>
Expand Down Expand Up @@ -242,6 +241,6 @@ template<size_t i, boost::numeric::ublas::integral T, T e1, T ... es>
} // namespace std


#endif // _BOOST_NUMERIC_UBLAS_TENSOR_EXTENTS_FUNCTIONS_HPP_
#endif // BOOST_NUMERIC_UBLAS_TENSOR_EXTENTS_FUNCTIONS_HPP


4 changes: 2 additions & 2 deletions include/boost/numeric/ublas/tensor/extents/extents_static.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "../concepts.hpp"


namespace boost::numeric::ublas {
namespace boost { namespace numeric { namespace ublas {


/** @brief Template class for storing tensor extents for compile time.
Expand Down Expand Up @@ -70,7 +70,7 @@ template <integral T, T e1, T e2, T... e> struct is_extents < extents_core<T
template <integral T, T e1, T e2, T... e> struct is_static < extents_core<T,e1, e2, e...> > : std::true_type {};
template <integral T, T e1, T e2, T... e> struct is_static_rank < extents_core<T,e1, e2, e...> > : std::true_type {};

} // namespace boost::numeric::ublas
} } } // namespace boost::numeric::ublas



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@



namespace boost::numeric::ublas
namespace boost { namespace numeric { namespace ublas
{


Expand Down Expand Up @@ -599,7 +599,7 @@ using to_strides_impl_t = typename detail::to_strides_impl_t<E,L,std::make_index
template<class E, class L>
constexpr inline auto to_strides_v = to_array_v<to_strides_impl_t<std::decay_t<E>,L>>;

} //namespace boost::numeric::ublas
} } } //namespace boost::numeric::ublas


template <
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include "../concepts.hpp"


namespace boost::numeric::ublas
namespace boost { namespace numeric { namespace ublas
{

/** @brief Class template for storing static-number of extents
Expand Down Expand Up @@ -131,12 +131,12 @@ class extents_core<T,N> : public extents_base<extents_core<T,N>>
base_type _base{};
};

} // namespace boost::numeric::ublas
} } } // namespace boost::numeric::ublas




namespace boost::numeric::ublas{
namespace boost { namespace numeric { namespace ublas
template <integral T, T n> struct is_extents < extents_core<T,n> > : std::true_type {};
template <integral T, T n> struct is_dynamic < extents_core<T,n> > : std::true_type {};
template <integral T, T n> struct is_static_rank < extents_core<T,n> > : std::true_type {};
Expand Down
10 changes: 5 additions & 5 deletions include/boost/numeric/ublas/tensor/function/conj.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@
#include "../expression.hpp"
#include "../expression_evaluation.hpp"

namespace boost::numeric::ublas
namespace boost { namespace numeric { namespace ublas
{
template<typename tensor_engine>
class tensor_core;

template<typename extents_type, typename layout_type, typename storage_type>
struct tensor_engine;

} // namespace boost::numeric::ublas
} } } // namespace boost::numeric::ublas

namespace boost::numeric::ublas
namespace boost { namespace numeric { namespace ublas
{
/** @brief Computes the complex conjugate component of tensor elements within a tensor expression
*
Expand Down Expand Up @@ -76,6 +76,6 @@ auto conj(detail::tensor_expression<T,D> const& expr)
}


} // namespace boost::numeric::ublas
} } } // namespace boost::numeric::ublas

#endif // BOOST_NUMERIC_UBLAS_TENSOR_PROD_DYNAMIC_HPP
#endif // BOOST_NUMERIC_UBLAS_TENSOR_CONJ_HPP
10 changes: 5 additions & 5 deletions include/boost/numeric/ublas/tensor/function/imag.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@
#include "../expression.hpp"
#include "../expression_evaluation.hpp"

namespace boost::numeric::ublas
namespace boost { namespace numeric { namespace ublas
{
template<typename tensor_engine>
class tensor_core;

template<typename extents_type, typename layout_type, typename storage_type>
struct tensor_engine;

} // namespace boost::numeric::ublas
} } } // namespace boost::numeric::ublas

namespace boost::numeric::ublas
namespace boost { namespace numeric { namespace ublas
{

/** @brief Extract the imaginary component of tensor elements within a tensor expression
Expand Down Expand Up @@ -77,6 +77,6 @@ auto imag(detail::tensor_expression< tensor_core< TE > ,D> const& expr)
return c;
}

} // namespace boost::numeric::ublas
} } } // namespace boost::numeric::ublas

#endif // BOOST_NUMERIC_UBLAS_TENSOR_PROD_DYNAMIC_HPP
#endif // BOOST_NUMERIC_UBLAS_TENSOR_IMAG_HPP
6 changes: 3 additions & 3 deletions include/boost/numeric/ublas/tensor/function/init.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
//#include <concepts>


namespace boost::numeric::ublas
namespace boost { namespace numeric { namespace ublas
{

template<class V, class L, auto n>
Expand Down Expand Up @@ -115,6 +115,6 @@ template<class V = float, class L = layout::first_order>
using zeros_static = init_static<V,L,0>;


} // namespace boost::numeric::ublas
} } } // namespace boost::numeric::ublas

#endif // BOOST_NUMERIC_UBLAS_TENSOR_FUNCTIONS_ONES_HPP
#endif // BOOST_NUMERIC_UBLAS_TENSOR_FUNCTIONS_INIT_HPP
10 changes: 5 additions & 5 deletions include/boost/numeric/ublas/tensor/function/inner_prod.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
#include "../multiplication.hpp"


namespace boost::numeric::ublas
namespace boost { namespace numeric { namespace ublas
{
template<typename tensor_engine>
class tensor_core;
} // namespace boost::numeric::ublas
} } } // namespace boost::numeric::ublas

namespace boost::numeric::ublas
namespace boost { namespace numeric { namespace ublas
{

/** @brief Computes the inner product of two tensors *
Expand Down Expand Up @@ -63,6 +63,6 @@ inline decltype(auto) inner_prod(tensor_core< TE1 > const &a, tensor_core< TE2 >
b.data(), b.strides().data(), value_type{0});
}

} // namespace boost::numeric::ublas
} } } // namespace boost::numeric::ublas

#endif // BOOST_NUMERIC_UBLAS_TENSOR_PROD_DYNAMIC_HPP
#endif // BOOST_NUMERIC_UBLAS_TENSOR_INNER_HPP
8 changes: 4 additions & 4 deletions include/boost/numeric/ublas/tensor/function/norm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@

#include "../traits/basic_type_traits.hpp"

namespace boost::numeric::ublas
namespace boost { namespace numeric { namespace ublas
{
template<typename tensor_engine>
class tensor_core;
} // namespace boost::numeric::ublas
} } } // namespace boost::numeric::ublas

namespace boost::numeric::ublas
namespace boost { namespace numeric { namespace ublas
{

/**
Expand Down Expand Up @@ -55,6 +55,6 @@ inline auto norm(tensor_core< TE > const &a)
[](auto const &l, auto const &r) { return l + r * r; }));
}

} // namespace boost::numeric::ublas
} } } // namespace boost::numeric::ublas

#endif // BOOST_NUMERIC_UBLAS_TENSOR_NORM_HPP
Loading