12 template <
typename T,
unsigned Dim>
16 template <
typename T,
unsigned Dim>
17 template <
typename... Args,
typename std::enable_if<
sizeof...(Args) ==
Dim,
bool>::type>
19 :
Vector({
static_cast<T>(args)...}) {}
21 template <
typename T,
unsigned Dim>
22 template <
typename E,
size_t N>
24 for (
unsigned int i = 0; i <
Dim; ++i) {
29 template <
typename T,
unsigned Dim>
31 for (
unsigned int i = 0; i <
Dim; ++i)
35 template <
typename T,
unsigned Dim>
39 for (
auto& l : list) {
50 template <
typename T,
unsigned Dim>
57 template <
typename T,
unsigned Dim>
59 unsigned int i)
const {
64 template <
typename T,
unsigned Dim>
71 template <
typename T,
unsigned Dim>
73 unsigned int i)
const {
83 template <
typename T,
unsigned Dim>
84 template <
typename E,
size_t N>
87 for (
unsigned int i = 0; i <
Dim; ++i) {
93 template <
typename T,
unsigned Dim>
94 template <
typename E,
size_t N>
97 for (
unsigned int i = 0; i <
Dim; ++i) {
103 template <
typename T,
unsigned Dim>
104 template <
typename E,
size_t N>
107 for (
unsigned int i = 0; i <
Dim; ++i) {
113 template <
typename T,
unsigned Dim>
114 template <
typename E,
size_t N>
117 for (
unsigned int i = 0; i <
Dim; ++i) {
123 template <
typename T,
unsigned Dim>
124 template <
typename E,
size_t N>
127 for (
unsigned int i = 0; i <
Dim; ++i) {
133 template <
typename T,
unsigned Dim>
135 for (
unsigned int i = 0; i <
Dim; ++i) {
141 template <
typename T,
unsigned Dim>
146 template <
typename T,
unsigned Dim>
148 for (
unsigned int i = 0; i <
Dim; ++i) {
154 template <
typename T,
unsigned Dim>
159 template <
typename T,
unsigned Dim>
164 template <
typename T,
unsigned Dim>
169 template <
typename T,
unsigned Dim>
175 template <
typename T,
unsigned Dim>
181 template <
typename T,
unsigned Dim>
184 for (
unsigned i = 0; i <
Dim; ++i) {
185 res +=
data_m[i] * rhs[i];
190 template <
typename T,
unsigned Dim>
194 for(
unsigned i = 0; i <
Dim; ++i) {
195 val += Kokkos::pow(Kokkos::abs(
data_m[i]), p);
198 return Kokkos::pow(val,
T(1.0) /
T(p));
201 template <
typename T,
unsigned Dim>
203 std::streamsize sw = out.width();
205 if constexpr (
Dim > 1) {
207 for (
unsigned int i = 0; i <
Dim - 1; i++) {
208 out << std::setw(sw) << v[i] <<
" , ";
210 out << std::setw(sw) << v[
Dim - 1] <<
" )";
212 out <<
"( " << std::setw(sw) << v[0] <<
" )";
216 template <
typename T,
unsigned Dim>
220 for (
unsigned d = 0; d <
Dim; d++) {
221 ret[d] =
min(a[d], b[d]);
225 template <
typename T,
unsigned Dim>
229 for (
unsigned d = 0; d <
Dim; d++) {
230 ret[d] =
max(a[d], b[d]);
ippl::Vector< T, Dim > Vector
KOKKOS_INLINE_FUNCTION Vector< T, Dim > min(const Vector< T, Dim > &a, const Vector< T, Dim > &b)
std::ostream & operator<<(std::ostream &os, const BConds< Field, Dim > &bc)
KOKKOS_INLINE_FUNCTION constexpr iterator begin()
KOKKOS_INLINE_FUNCTION T Pnorm(const int p=2) const
KOKKOS_INLINE_FUNCTION Vector< T, Dim > & operator/=(const detail::Expression< E, N > &expr)
KOKKOS_INLINE_FUNCTION Vector< T, Dim > & operator-=(const detail::Expression< E, N > &expr)
KOKKOS_INLINE_FUNCTION Vector< T, Dim > & operator+=(const detail::Expression< E, N > &expr)
KOKKOS_INLINE_FUNCTION Vector< T, Dim > & operator*=(const detail::Expression< E, N > &expr)
KOKKOS_INLINE_FUNCTION value_type & operator[](unsigned int i)
KOKKOS_INLINE_FUNCTION value_type & operator()(unsigned int i)
KOKKOS_INLINE_FUNCTION Vector< T, Dim > & operator=(const detail::Expression< E, N > &expr)
KOKKOS_INLINE_FUNCTION T dot(const Vector< T, Dim > &rhs) const
KOKKOS_INLINE_FUNCTION constexpr iterator end()