Stokhos Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
Kokkos_Blas1_UQ_PCE.hpp
Go to the documentation of this file.
1// @HEADER
2// ***********************************************************************
3//
4// Stokhos Package
5// Copyright (2009) Sandia Corporation
6//
7// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8// license for use of this work by or on behalf of the U.S. Government.
9//
10// Redistribution and use in source and binary forms, with or without
11// modification, are permitted provided that the following conditions are
12// met:
13//
14// 1. Redistributions of source code must retain the above copyright
15// notice, this list of conditions and the following disclaimer.
16//
17// 2. Redistributions in binary form must reproduce the above copyright
18// notice, this list of conditions and the following disclaimer in the
19// documentation and/or other materials provided with the distribution.
20//
21// 3. Neither the name of the Corporation nor the names of the
22// contributors may be used to endorse or promote products derived from
23// this software without specific prior written permission.
24//
25// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36//
37// Questions? Contact Eric T. Phipps (etphipp@sandia.gov).
38//
39// ***********************************************************************
40// @HEADER
41
42#ifndef KOKKOS_BLAS1_UQ_PCE_HPP
43#define KOKKOS_BLAS1_UQ_PCE_HPP
44
45#include "Sacado_UQ_PCE.hpp"
48#include "KokkosBlas.hpp"
49
50//----------------------------------------------------------------------------
51// Specializations of Kokkos Vector/MultiVector math functions
52//----------------------------------------------------------------------------
53
54namespace KokkosBlas {
55
56template <typename XD, typename ... XP,
57 typename YD, typename ... YP>
58typename std::enable_if<
59 Kokkos::is_view_uq_pce< Kokkos::View<XD,XP...> >::value &&
60 Kokkos::is_view_uq_pce< Kokkos::View<YD,YP...> >::value,
61 typename Kokkos::Details::InnerProductSpaceTraits<
62 typename Kokkos::View<XD,XP...>::non_const_value_type >::dot_type
63 >::type
64dot(const Kokkos::View<XD,XP...>& x,
65 const Kokkos::View<YD,YP...>& y)
66{
67 typedef Kokkos::View<XD,XP...> XVector;
68 typedef Kokkos::View<YD,YP...> YVector;
69
70 typename Kokkos::FlatArrayType<XVector>::type x_flat = x;
71 typename Kokkos::FlatArrayType<YVector>::type y_flat = y;
72
73 return dot( x_flat, y_flat );
74}
75
76template <typename RV,
77 typename XD, typename ... XP,
78 typename YD, typename ... YP>
79typename std::enable_if<
80 Kokkos::is_view_uq_pce< Kokkos::View<XD,XP...> >::value &&
81 Kokkos::is_view_uq_pce< Kokkos::View<YD,YP...> >::value >::type
82dot(const RV& r,
83 const Kokkos::View<XD,XP...>& x,
84 const Kokkos::View<YD,YP...>& y)
85{
86 typedef Kokkos::View<XD,XP...> XVector;
87 typedef Kokkos::View<YD,YP...> YVector;
88
89 typename Kokkos::FlatArrayType<XVector>::type x_flat = x;
90 typename Kokkos::FlatArrayType<YVector>::type y_flat = y;
91
92 dot( r, x_flat, y_flat );
93}
94
95template <typename XD, typename ... XP>
96typename std::enable_if<
97 Kokkos::is_view_uq_pce< Kokkos::View<XD,XP...> >::value >::type
98fill(const Kokkos::View<XD,XP...>& x,
99 const typename Kokkos::View<XD,XP...>::non_const_value_type& val) {
100 typedef Kokkos::View<XD,XP...> XVector;
101
102 // Use the existing fill() implementation if we can
104 typename Kokkos::FlatArrayType<XVector>::type x_flat = x;
105 fill( x_flat, val.coeff(0) );
106 }
107 else {
109 }
110}
111
112template <typename RV,
113 typename XD, typename ... XP>
114typename std::enable_if<
115 Kokkos::is_view_uq_pce< Kokkos::View<XD,XP...> >::value >::type
117 const RV& r,
118 const Kokkos::View<XD,XP...>& x)
119{
120 typedef Kokkos::View<XD,XP...> XVector;
121
122 typename Kokkos::FlatArrayType<XVector>::type x_flat = x;
123
124 nrm2_squared( r, x_flat );
125}
126
127template <typename RV,
128 typename XD, typename ... XP>
129typename std::enable_if<
130 Kokkos::is_view_uq_pce< Kokkos::View<XD,XP...> >::value >::type
132 const RV& r,
133 const Kokkos::View<XD,XP...>& x)
134{
135 typedef Kokkos::View<XD,XP...> XVector;
136
137 typename Kokkos::FlatArrayType<XVector>::type x_flat = x;
138
139 nrm1( r, x_flat );
140}
141
142template <typename RV,
143 typename XD, typename ... XP>
144typename std::enable_if<
145 Kokkos::is_view_uq_pce< Kokkos::View<XD,XP...> >::value >::type
147 const RV& r,
148 const Kokkos::View<XD,XP...>& x)
149{
150 typedef Kokkos::View<XD,XP...> XVector;
151
152 typename Kokkos::FlatArrayType<XVector>::type x_flat = x;
153
154 nrmInf( r, x_flat );
155}
156
157template <typename AV,
158 typename XD, typename ... XP,
159 typename BV,
160 typename YD, typename ... YP>
161typename std::enable_if<
162 Kokkos::is_view_uq_pce< Kokkos::View<XD,XP...> >::value &&
163 Kokkos::is_view_uq_pce< Kokkos::View<YD,YP...> >::value >::type
164axpby(const AV& a,
165 const Kokkos::View<XD,XP...>& x,
166 const BV& b,
167 const Kokkos::View<YD,YP...>& y)
168{
169 typedef Kokkos::View<XD,XP...> XVector;
170 typedef Kokkos::View<YD,YP...> YVector;
171
173 Kokkos::Impl::raise_error("axpby not implemented for non-constant a or b");
174 }
175
176 typename Kokkos::FlatArrayType<XVector>::type x_flat = x;
177 typename Kokkos::FlatArrayType<YVector>::type y_flat = y;
178 auto aa = Sacado::Value<AV>::eval(a);
179 auto bb = Sacado::Value<BV>::eval(b);
180 axpby( aa, x_flat, bb, y_flat );
181}
182
183// Currently not handling scal() when AV is a view
184
185template <typename RD, typename ... RP,
186 typename XD, typename ... XP>
187typename std::enable_if<
188 Kokkos::is_view_uq_pce< Kokkos::View<RD,RP...> >::value &&
189 Kokkos::is_view_uq_pce< Kokkos::View<XD,XP...> >::value >::type
190scal(const Kokkos::View<RD,RP...>& r,
191 const typename Kokkos::View<XD,XP...>::non_const_value_type& a,
192 const Kokkos::View<XD,XP...>& x)
193{
194 typedef Kokkos::View<RD,RP...> RVector;
195 typedef Kokkos::View<XD,XP...> XVector;
196
197 if (!Sacado::is_constant(a)) {
198 Kokkos::Impl::raise_error("scal not implemented for non-constant a");
199 }
200
201 typename Kokkos::FlatArrayType<XVector>::type x_flat = x;
202 typename Kokkos::FlatArrayType<RVector>::type r_flat = r;
203 scal( r_flat, a.coeff(0), x_flat );
204}
205
206// abs -- can't do this one by flattening. Hold out for refactoring of scalar
207// types in Kokkos
208
209// We have a special verision of update for scalar alpha/beta/gamma since it
210// is used in TrilinosCouplings CG solve (even though Tpetra doesn't).
211template <typename XD, typename ... XP,
212 typename YD, typename ... YP,
213 typename ZD, typename ... ZP>
214typename std::enable_if<
215 Kokkos::is_view_uq_pce< Kokkos::View<XD,XP...> >::value &&
216 Kokkos::is_view_uq_pce< Kokkos::View<YD,YP...> >::value &&
217 Kokkos::is_view_uq_pce< Kokkos::View<ZD,ZP...> >::value >::type
219 const typename Kokkos::View<XD,XP...>::array_type::non_const_value_type& alpha,
220 const Kokkos::View<XD,XP...>& x,
221 const typename Kokkos::View<YD,YP...>::array_type::non_const_value_type& beta,
222 const Kokkos::View<YD,YP...>& y,
223 const typename Kokkos::View<ZD,ZP...>::array_type::non_const_value_type& gamma,
224 const Kokkos::View<ZD,ZP...>& z)
225{
226 typedef Kokkos::View<XD,XP...> XVector;
227 typedef Kokkos::View<YD,YP...> YVector;
228 typedef Kokkos::View<ZD,ZP...> ZVector;
229
230 typename Kokkos::FlatArrayType<XVector>::type x_flat = x;
231 typename Kokkos::FlatArrayType<YVector>::type y_flat = y;
232 typename Kokkos::FlatArrayType<ZVector>::type z_flat = z;
233
234 update( alpha, x_flat, beta, y_flat, gamma, z_flat);
235
236}
237
238template <typename XD, typename ... XP,
239 typename YD, typename ... YP,
240 typename ZD, typename ... ZP>
241typename std::enable_if<
242 Kokkos::is_view_uq_pce< Kokkos::View<XD,XP...> >::value &&
243 Kokkos::is_view_uq_pce< Kokkos::View<YD,YP...> >::value &&
244 Kokkos::is_view_uq_pce< Kokkos::View<ZD,ZP...> >::value >::type
246 const typename Kokkos::View<XD,XP...>::non_const_value_type& alpha,
247 const Kokkos::View<XD,XP...>& x,
248 const typename Kokkos::View<YD,YP...>::non_const_value_type& beta,
249 const Kokkos::View<YD,YP...>& y,
250 const typename Kokkos::View<ZD,ZP...>::non_const_value_type& gamma,
251 const Kokkos::View<ZD,ZP...>& z)
252{
253 if (!Sacado::is_constant(alpha) || !Sacado::is_constant(beta) ||
254 !Sacado::is_constant(gamma)) {
256 "update not implemented for non-constant alpha, beta, gamma");
257 }
258
259 update( alpha.coeff(0), x, beta.coeff(0), y, gamma.coeff(0), z );
260}
261
262// Mean-based implementation of reciprocal()
263namespace Impl {
264
265template<class RS, class ... RP,
266 class XS, class ... XP,
267 class SizeType>
268struct MV_Reciprocal_Functor<
269 Kokkos::View<Sacado::UQ::PCE<RS>**,RP...>,
270 Kokkos::View<const Sacado::UQ::PCE<XS>**,XP...>,
271 SizeType>
272{
273 typedef Kokkos::View<Sacado::UQ::PCE<RS>**,RP...> RMV;
274 typedef Kokkos::View<const Sacado::UQ::PCE<XS>**,XP...> XMV;
275 typedef typename RMV::execution_space execution_space;
276 typedef SizeType size_type;
277 typedef Kokkos::Details::ArithTraits<typename Kokkos::IntrinsicScalarType<XMV>::type> ATS;
278
282
283 MV_Reciprocal_Functor (const RMV& R, const XMV& X) :
284 numCols (X.extent(1)), R_ (R), X_ (X)
285 {
286 }
287
288 KOKKOS_INLINE_FUNCTION
289 void operator() (const size_type& i) const
290 {
291#ifdef KOKKOS_ENABLE_PRAGMA_IVDEP
292#pragma ivdep
293#endif
294 for (size_type j = 0; j < numCols; ++j) {
295 R_(i,j) = ATS::one () / X_(i,j).fastAccessCoeff(0);
296 }
297 }
298};
299
300template<class RS, class ... RP,
301 class SizeType>
302struct MV_ReciprocalSelf_Functor<
303 Kokkos::View<Sacado::UQ::PCE<RS>**,RP...>,
304 SizeType>
305{
306 typedef Kokkos::View<Sacado::UQ::PCE<RS>**,RP...> RMV;
307 typedef typename RMV::execution_space execution_space;
308 typedef SizeType size_type;
309 typedef Kokkos::Details::ArithTraits<typename Kokkos::IntrinsicScalarType<RMV>::type> ATS;
310
313
315 numCols (R.extent(1)), R_ (R)
316 {
317 }
318
319 KOKKOS_INLINE_FUNCTION
320 void operator() (const size_type& i) const
321 {
322#ifdef KOKKOS_ENABLE_PRAGMA_IVDEP
323#pragma ivdep
324#endif
325 for (size_type j = 0; j < numCols; ++j) {
326 R_(i,j) = ATS::one () / R_(i,j).fastAccessCoeff(0);
327 }
328 }
329};
330
331template<class RS, class ... RP,
332 class XS, class ... XP,
333 class SizeType>
334struct V_Reciprocal_Functor<
335 Kokkos::View<Sacado::UQ::PCE<RS>*,RP...>,
336 Kokkos::View<const Sacado::UQ::PCE<XS>*,XP...>,
337 SizeType>
338{
339 typedef Kokkos::View<Sacado::UQ::PCE<RS>*,RP...> RV;
340 typedef Kokkos::View<const Sacado::UQ::PCE<XS>*,XP...> XV;
341 typedef typename RV::execution_space execution_space;
342 typedef SizeType size_type;
343 typedef Kokkos::Details::ArithTraits<typename Kokkos::IntrinsicScalarType<XV>::type> ATS;
344
347
348 V_Reciprocal_Functor (const RV& R, const XV& X) : R_ (R), X_ (X)
349 {
350 }
351
352 KOKKOS_INLINE_FUNCTION
353 void operator() (const size_type& i) const
354 {
355 R_(i) = ATS::one () / X_(i).fastAccessCoeff(0);
356 }
357};
358
359template<class RS, class ... RP,
360 class SizeType>
361struct V_ReciprocalSelf_Functor<
362 Kokkos::View<Sacado::UQ::PCE<RS>*,RP...>,
363 SizeType>
364{
365 typedef Kokkos::View<Sacado::UQ::PCE<RS>*,RP...> RV;
366 typedef typename RV::execution_space execution_space;
367 typedef SizeType size_type;
368 typedef Kokkos::Details::ArithTraits<typename Kokkos::IntrinsicScalarType<RV>::type> ATS;
369
371
372 V_ReciprocalSelf_Functor (const RV& R) : R_ (R)
373 {
374 }
375
376 KOKKOS_INLINE_FUNCTION
377 void operator() (const size_type& i) const
378 {
379 R_(i) = ATS::one () / R_(i).fastAccessCoeff(0);
380 }
381};
382
383} // namespace Impl
384
385template <typename RD, typename ... RP,
386 typename XD, typename ... XP>
387typename std::enable_if<
388 Kokkos::is_view_uq_pce< Kokkos::View<RD,RP...> >::value &&
389 Kokkos::is_view_uq_pce< Kokkos::View<XD,XP...> >::value >::type
391 const Kokkos::View<RD,RP...>& r,
392 const Kokkos::View<XD,XP...>& x)
393{
394 typedef Kokkos::View<RD,RP...> RVector;
395 typedef Kokkos::View<XD,XP...> XVector;
396
397 typename Kokkos::FlatArrayType<XVector>::type x_flat = x;
398 typename Kokkos::FlatArrayType<RVector>::type r_flat = r;
399 sum( r_flat, x_flat );
400}
401
402template <typename RD, typename ... RP,
403 typename XD, typename ... XP,
404 typename WD, typename ... WP>
405typename std::enable_if<
406 Kokkos::is_view_uq_pce< Kokkos::View<RD,RP...> >::value &&
407 Kokkos::is_view_uq_pce< Kokkos::View<XD,XP...> >::value &&
408 Kokkos::is_view_uq_pce< Kokkos::View<WD,WP...> >::value >::type
410 const Kokkos::View<RD,RP...>& r,
411 const Kokkos::View<XD,XP...>& x,
412 const Kokkos::View<WD,WP...>& w)
413{
414 typedef Kokkos::View<RD,RP...> RVector;
415 typedef Kokkos::View<XD,XP...> XVector;
416 typedef Kokkos::View<WD,WP...> WVector;
417
418 typename Kokkos::FlatArrayType<XVector>::type x_flat = x;
419 typename Kokkos::FlatArrayType<RVector>::type r_flat = r;
420 typename Kokkos::FlatArrayType<WVector>::type w_flat = w;
421 nrm2w_squared( r_flat, x_flat, w_flat );
422}
423
424// Mean-based implementation of mult()
425namespace Impl {
426
427template<class CS, class ... CP,
428 class AS, class ... AP,
429 class BS, class ... BP,
430 int scalar_ab, int scalar_c, class SizeType>
431struct MV_MultFunctor<
432 Kokkos::View<Sacado::UQ::PCE<CS>**,CP...>,
433 Kokkos::View<const Sacado::UQ::PCE<AS>*,AP...>,
434 Kokkos::View<const Sacado::UQ::PCE<BS>**,BP...>,
435 scalar_ab, scalar_c, SizeType>
436{
437 typedef Kokkos::View<Sacado::UQ::PCE<CS>**,CP...> CMV;
438 typedef Kokkos::View<const Sacado::UQ::PCE<AS>*,AP...> AV;
439 typedef Kokkos::View<const Sacado::UQ::PCE<BS>**,BP...> BMV;
440 typedef typename CMV::execution_space execution_space;
441 typedef SizeType size_type;
442 typedef Kokkos::Details::ArithTraits<typename Kokkos::IntrinsicScalarType<CMV>::type> ATS;
443
451
452 MV_MultFunctor (typename CMV::const_value_type& c,
453 const CMV& C,
454 typename AV::const_value_type& ab,
455 const AV& A,
456 const BMV& B) :
457 m_n (C.extent(1)),
458 m_pce (dimension_scalar(C)),
459 m_c (c.coeff(0)), m_C (C), m_ab (ab.coeff(0)), m_A (A), m_B (B)
460 {
462 Kokkos::Impl::raise_error("mult not implemented for non-constant c, ab");
463 }
464 }
465
466 KOKKOS_INLINE_FUNCTION void
467 operator () (const size_type& i) const
468 {
469 if (scalar_c == 0) {
470 if (scalar_ab == 0) {
471 for (size_type j = 0; j < m_n; ++j) {
472#ifdef KOKKOS_ENABLE_PRAGMA_IVDEP
473#pragma ivdep
474#endif
475 for (size_type l=0; l<m_pce; ++l)
476 m_C(i,j).fastAccessCoeff(l) = ATS::zero ();
477 }
478 }
479 else { // ab != 0, c == 0
480 typename Kokkos::IntrinsicScalarType<AV>::type Ai = m_A(i).fastAccessCoeff(0);
481 for (size_type j = 0; j < m_n; ++j) {
482#ifdef KOKKOS_ENABLE_PRAGMA_IVDEP
483#pragma ivdep
484#endif
485 for (size_type l=0; l<m_pce; ++l)
486 m_C(i,j).fastAccessCoeff(l) =
487 m_ab * Ai * m_B(i,j).fastAccessCoeff(l);
488 }
489 }
490 } else { // c != 0
491 if (scalar_ab == 0) {
492 for (size_type j = 0; j < m_n; ++j) {
493#ifdef KOKKOS_ENABLE_PRAGMA_IVDEP
494#pragma ivdep
495#endif
496 for (size_type l=0; l<m_pce; ++l)
497 m_C(i,j).fastAccessCoeff(l) = m_c * m_C(i,j).fastAccessCoeff(l);
498 }
499 }
500 else { // m_ab != 0, and m_c != 0
501 typename Kokkos::IntrinsicScalarType<AV>::type Ai = m_A(i).fastAccessCoeff(0);
502 for (size_type j = 0; j < m_n; ++j) {
503#ifdef KOKKOS_ENABLE_PRAGMA_IVDEP
504#pragma ivdep
505#endif
506 for (size_type l=0; l<m_pce; ++l)
507 m_C(i,j).fastAccessCoeff(l) =
508 m_c * m_C(i,j).fastAccessCoeff(l) + m_ab * Ai * m_B(i,j).fastAccessCoeff(l);
509 }
510 }
511 }
512 }
513};
514
515template<class CS, class ... CP,
516 class AS, class ... AP,
517 class BS, class ... BP,
518 int scalar_ab, int scalar_c, class SizeType>
519struct V_MultFunctor<
520 Kokkos::View<Sacado::UQ::PCE<CS>*,CP...>,
521 Kokkos::View<const Sacado::UQ::PCE<AS>*,AP...>,
522 Kokkos::View<const Sacado::UQ::PCE<BS>*,BP...>,
523 scalar_ab, scalar_c, SizeType>
524{
525 typedef Kokkos::View<Sacado::UQ::PCE<CS>*,CP...> CV;
526 typedef Kokkos::View<const Sacado::UQ::PCE<AS>*,AP...> AV;
527 typedef Kokkos::View<const Sacado::UQ::PCE<BS>*,BP...> BV;
528 typedef typename CV::execution_space execution_space;
529 typedef SizeType size_type;
530 typedef Kokkos::Details::ArithTraits<typename Kokkos::IntrinsicScalarType<CV>::type> ATS;
531
538
539 V_MultFunctor (typename CV::const_value_type& c,
540 const CV& C,
541 typename AV::const_value_type& ab,
542 const AV& A,
543 const BV& B) :
544 m_pce (dimension_scalar(C)),
545 m_c (c.coeff(0)), m_C (C), m_ab (ab.coeff(0)), m_A (A), m_B (B)
546 {
548 Kokkos::Impl::raise_error("mult not implemented for non-constant c, ab");
549 }
550 }
551
552 KOKKOS_INLINE_FUNCTION void
553 operator () (const size_type& i) const
554 {
555 if (scalar_c == 0) {
556 if (scalar_ab == 0) {
557#ifdef KOKKOS_ENABLE_PRAGMA_IVDEP
558#pragma ivdep
559#endif
560 for (size_type l=0; l<m_pce; ++l)
561 m_C(i).fastAccessCoeff(l) = ATS::zero ();
562 }
563 else { // ab != 0, c == 0
564 typename Kokkos::IntrinsicScalarType<AV>::type Ai = m_A(i).fastAccessCoeff(0);
565#ifdef KOKKOS_ENABLE_PRAGMA_IVDEP
566#pragma ivdep
567#endif
568 for (size_type l=0; l<m_pce; ++l)
569 m_C(i).fastAccessCoeff(l) = m_ab * Ai * m_B(i).fastAccessCoeff(l);
570 }
571 } else { // c != 0
572 if (scalar_ab == 0) {
573#ifdef KOKKOS_ENABLE_PRAGMA_IVDEP
574#pragma ivdep
575#endif
576 for (size_type l=0; l<m_pce; ++l)
577 m_C(i).fastAccessCoeff(l) = m_c * m_C(i).fastAccessCoeff(l);
578 }
579 else { // m_ab != 0, and m_c != 0
580 typename Kokkos::IntrinsicScalarType<AV>::type Ai = m_A(i).fastAccessCoeff(0);
581#ifdef KOKKOS_ENABLE_PRAGMA_IVDEP
582#pragma ivdep
583#endif
584 for (size_type l=0; l<m_pce; ++l)
585 m_C(i).fastAccessCoeff(l) =
586 m_c * m_C(i).fastAccessCoeff(l) + m_ab * Ai * m_B(i).fastAccessCoeff(l);
587 }
588 }
589 }
590};
591
592} // namespace Impl
593
594} // namespace KokkosBlas
595
596#endif /* #ifndef KOKKOS_MV_UQ_PCE_HPP */
expr val()
std::enable_if< Kokkos::is_view_uq_pce< Kokkos::View< XD, XP... > >::value &&Kokkos::is_view_uq_pce< Kokkos::View< YD, YP... > >::value >::type axpby(const AV &a, const Kokkos::View< XD, XP... > &x, const BV &b, const Kokkos::View< YD, YP... > &y)
std::enable_if< Kokkos::is_view_uq_pce< Kokkos::View< XD, XP... > >::value >::type nrm1(const RV &r, const Kokkos::View< XD, XP... > &x)
std::enable_if< Kokkos::is_view_uq_pce< Kokkos::View< XD, XP... > >::value >::type nrmInf(const RV &r, const Kokkos::View< XD, XP... > &x)
std::enable_if< Kokkos::is_view_uq_pce< Kokkos::View< XD, XP... > >::value >::type fill(const Kokkos::View< XD, XP... > &x, const typename Kokkos::View< XD, XP... >::non_const_value_type &val)
std::enable_if< Kokkos::is_view_uq_pce< Kokkos::View< RD, RP... > >::value &&Kokkos::is_view_uq_pce< Kokkos::View< XD, XP... > >::value >::type scal(const Kokkos::View< RD, RP... > &r, const typename Kokkos::View< XD, XP... >::non_const_value_type &a, const Kokkos::View< XD, XP... > &x)
std::enable_if< Kokkos::is_view_uq_pce< Kokkos::View< RD, RP... > >::value &&Kokkos::is_view_uq_pce< Kokkos::View< XD, XP... > >::value >::type sum(const Kokkos::View< RD, RP... > &r, const Kokkos::View< XD, XP... > &x)
std::enable_if< Kokkos::is_view_uq_pce< Kokkos::View< XD, XP... > >::value >::type nrm2_squared(const RV &r, const Kokkos::View< XD, XP... > &x)
std::enable_if< Kokkos::is_view_uq_pce< Kokkos::View< XD, XP... > >::value &&Kokkos::is_view_uq_pce< Kokkos::View< YD, YP... > >::value, typenameKokkos::Details::InnerProductSpaceTraits< typenameKokkos::View< XD, XP... >::non_const_value_type >::dot_type >::type dot(const Kokkos::View< XD, XP... > &x, const Kokkos::View< YD, YP... > &y)
std::enable_if< Kokkos::is_view_uq_pce< Kokkos::View< XD, XP... > >::value &&Kokkos::is_view_uq_pce< Kokkos::View< YD, YP... > >::value &&Kokkos::is_view_uq_pce< Kokkos::View< ZD, ZP... > >::value >::type update(const typename Kokkos::View< XD, XP... >::array_type::non_const_value_type &alpha, const Kokkos::View< XD, XP... > &x, const typename Kokkos::View< YD, YP... >::array_type::non_const_value_type &beta, const Kokkos::View< YD, YP... > &y, const typename Kokkos::View< ZD, ZP... >::array_type::non_const_value_type &gamma, const Kokkos::View< ZD, ZP... > &z)
std::enable_if< Kokkos::is_view_uq_pce< Kokkos::View< RD, RP... > >::value &&Kokkos::is_view_uq_pce< Kokkos::View< XD, XP... > >::value &&Kokkos::is_view_uq_pce< Kokkos::View< WD, WP... > >::value >::type nrm2w_squared(const Kokkos::View< RD, RP... > &r, const Kokkos::View< XD, XP... > &x, const Kokkos::View< WD, WP... > &w)
KOKKOS_INLINE_FUNCTION void raise_error(const char *msg)
void deep_copy(const Stokhos::CrsMatrix< ValueType, DstDevice, Layout > &dst, const Stokhos::CrsMatrix< ValueType, SrcDevice, Layout > &src)
KOKKOS_INLINE_FUNCTION bool is_constant(const T &x)
Kokkos::Details::ArithTraits< typename Kokkos::IntrinsicScalarType< RMV >::type > ATS
Kokkos::Details::ArithTraits< typename Kokkos::IntrinsicScalarType< RV >::type > ATS
view_type::array_type::non_const_value_type type