Tpetra Matrix/Vector Services  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Tpetra_RTI_detail.hpp
1 // @HEADER
2 // ***********************************************************************
3 //
4 // Tpetra: Templated Linear Algebra Services Package
5 // Copyright (2008) Sandia Corporation
6 //
7 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
8 // the U.S. Government retains certain rights in this software.
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 Michael A. Heroux (maherou@sandia.gov)
38 //
39 // ************************************************************************
40 // @HEADER
41 
42 #ifndef TPETRA_RTI_detail_HPP
43 #define TPETRA_RTI_detail_HPP
44 
45 #include <Teuchos_Assert.hpp>
46 #include <Teuchos_CommHelpers.hpp>
47 #include <Kokkos_NodeHelpers.hpp>
48 
49 #include "Tpetra_Vector.hpp"
50 
51 namespace Tpetra {
52 
53  namespace RTI {
54 
56  namespace detail {
57 
59  template <class S>
61  {
62  protected:
63  S _alpha, _beta;
64  S * _vec_inout;
65  const S * _vec_in2;
66  public:
67  inline StdOpKernel() : _alpha(ScalarTraits<S>::one()), _beta(ScalarTraits<S>::zero()) {}
68  inline void setData(S * vec_inout, const S * vec_in2) { _vec_inout = vec_inout; _vec_in2 = vec_in2; }
69  inline void setAlphaBeta(const S &alpha, const S &beta) { _alpha = alpha; _beta = beta; }
70  };
71 
73  template <class OP, class S>
75  protected:
76  OP _op;
77  S * _vec;
78  public:
79  UnaryFunctorAdapter(OP op) : _op(op) {}
80  inline void setData(S *vec) { _vec = vec; }
81  inline void execute(int i) { _vec[i] = _op(_vec[i]); }
82  };
83 
85  template <class OP, class S1, class S2>
87  protected:
88  OP _op;
89  S1 * _vec_inout;
90  const S2 * _vec_in2;
91  public:
92  BinaryFunctorAdapter(OP op) : _op(op) {}
93  inline void setData(S1 *vec_inout, const S2 *vec_in2) { _vec_inout = vec_inout; _vec_in2 = vec_in2; }
94  inline void execute(int i) { _vec_inout[i] = _op(_vec_inout[i], _vec_in2[i]); }
95  };
96 
98  template <class OP, class S>
100  protected:
101  OP _op;
102  S * _vec_inout;
103  const S * _vec_in2;
104  public:
105  BinaryFunctorAdapterWithAlphaBeta(OP op) : _op(op) {}
106  inline void setData(S *vec_inout, const S *vec_in2) { _vec_inout = vec_inout; _vec_in2 = vec_in2; }
107  inline void execute(int i)
108  {
109  S res = _op(_vec_inout[i], _vec_in2[i]);
110  _vec_inout[i] = this->_alpha * res + this->_beta * _vec_inout[i];
111  }
112  };
113 
115  template <class OP, class S1, class S2, class S3>
117  protected:
118  OP _op;
119  S1 * _vec_inout;
120  const S2 * _vec_in2;
121  const S3 * _vec_in3;
122  public:
123  TertiaryFunctorAdapter(OP op) : _op(op) {}
124  inline void setData(S1 *vec_inout, const S2 *vec_in2, const S3 *vec_in3) { _vec_inout = vec_inout; _vec_in2 = vec_in2; _vec_in3 = vec_in3; }
125  inline void execute(int i) { _vec_inout[i] = _op(_vec_inout[i], _vec_in2[i], _vec_in3[i]); }
126  };
127 
129  template <class Glob, class S>
131  public:
132  typedef typename Glob::GenOP GenOP;
133  typedef typename Glob::RedOP RedOP;
134  typedef typename Glob::IdOP IdOP;
135  typedef typename RedOP::result_type ReductionType;
136  protected:
137  GenOP _genop;
138  RedOP _redop;
139  const S * _vec_in;
140  public:
141  RTIReductionAdapter1(Glob glob) : _genop(glob.genop), _redop(glob.redop) {}
142  inline void setData(const S *vec_in) { _vec_in = vec_in; }
143  static inline ReductionType identity() { return IdOP::identity(); }
144  inline ReductionType generate(int i) { return _genop(_vec_in[i]); }
145  inline ReductionType reduce(ReductionType a, ReductionType b) { return _redop(a, b); }
146  };
147 
149  template <class Glob, class S1, class S2>
151  public:
152  typedef typename Glob::GenOP GenOP;
153  typedef typename Glob::RedOP RedOP;
154  typedef typename Glob::IdOP IdOP;
155  typedef typename RedOP::result_type ReductionType;
156  protected:
157  GenOP _genop;
158  RedOP _redop;
159  const S1 * _vec_in1;
160  const S2 * _vec_in2;
161  public:
162  RTIReductionAdapter2(Glob glob) : _genop(glob.genop), _redop(glob.redop) {}
163  inline void setData(const S1 *vec_in1, const S2 *vec_in2) { _vec_in1 = vec_in1; _vec_in2 = vec_in2; }
164  static inline ReductionType identity() { return IdOP::identity(); }
165  inline ReductionType generate(int i) { return _genop(_vec_in1[i], _vec_in2[i]); }
166  inline ReductionType reduce(ReductionType a, ReductionType b) { return _redop(a, b); }
167  };
168 
170  template <class Glob, class S1, class S2, class S3>
172  public:
173  typedef typename Glob::GenOP GenOP;
174  typedef typename Glob::RedOP RedOP;
175  typedef typename Glob::IdOP IdOP;
176  typedef typename RedOP::result_type ReductionType;
177  protected:
178  GenOP _genop;
179  RedOP _redop;
180  const S1 * _vec_in1;
181  const S2 * _vec_in2;
182  const S3 * _vec_in3;
183  public:
184  RTIReductionAdapter3(Glob glob) : _genop(glob.genop), _redop(glob.redop) {}
185  inline void setData(const S1 *vec_in1, const S2 *vec_in2, const S3 *vec_in3) { _vec_in1 = vec_in1; _vec_in2 = vec_in2; _vec_in3 = vec_in3; }
186  static inline ReductionType identity() { return IdOP::identity(); }
187  inline ReductionType generate(int i) { return _genop(_vec_in1[i], _vec_in2[i], _vec_in3[i]); }
188  inline ReductionType reduce(ReductionType a, ReductionType b) { return _redop(a, b); }
189  };
190 
192  template <class Glob, class S1, class S2>
194  public:
195  typedef typename Glob::TOP TOP;
196  typedef typename Glob::GenOP GenOP;
197  typedef typename Glob::RedOP RedOP;
198  typedef typename Glob::IdOP IdOP;
199  typedef typename RedOP::result_type ReductionType;
200  protected:
201  TOP _top;
202  GenOP _genop;
203  RedOP _redop;
204  S1 * _vec_inout;
205  const S2 * _vec_in2;
206  public:
207  RTIPreTransformReductionAdapter(Glob glob) : _top(glob.top), _genop(glob.genop), _redop(glob.redop) {}
208  inline void setData(S1 *vec_inout, const S2 *vec_in2) { _vec_inout = vec_inout; _vec_in2 = vec_in2; }
209  static inline ReductionType identity() { return IdOP::identity(); }
210  inline ReductionType reduce(ReductionType a, ReductionType b) { return _redop(a, b); }
211  inline ReductionType generate(int i)
212  {
213  _vec_inout[i] = _top( _vec_inout[i], _vec_in2[i] );
214  return _genop( _vec_inout[i], _vec_in2[i] );
215  }
216  };
217 
219  template <class Glob, class S1, class S2, class S3>
221  public:
222  typedef typename Glob::TOP TOP;
223  typedef typename Glob::GenOP GenOP;
224  typedef typename Glob::RedOP RedOP;
225  typedef typename Glob::IdOP IdOP;
226  typedef typename RedOP::result_type ReductionType;
227  protected:
228  TOP _top;
229  GenOP _genop;
230  RedOP _redop;
231  S1 * _vec_inout;
232  const S2 * _vec_in2;
233  const S3 * _vec_in3;
234  public:
235  RTIPreTransformReductionAdapter3(Glob glob) : _top(glob.top), _genop(glob.genop), _redop(glob.redop) {}
236  inline void setData(S1 *vec_inout, const S2 *vec_in2, const S3 *vec_in3) { _vec_inout = vec_inout; _vec_in2 = vec_in2; _vec_in3 = vec_in3; }
237  static inline ReductionType identity() { return IdOP::identity(); }
238  inline ReductionType reduce(ReductionType a, ReductionType b) { return _redop(a, b); }
239  inline ReductionType generate(int i)
240  {
241  _vec_inout[i] = _top( _vec_inout[i], _vec_in2[i], _vec_in3[i] );
242  return _genop( _vec_inout[i], _vec_in2[i], _vec_in3[i] );
243  }
244  };
245 
247  template <class OP>
248  class TeuchosValueTypeReductionOpAdapter : public Teuchos::ValueTypeReductionOp<int,typename OP::ReductionType>
249  {
250  protected:
251  mutable OP _op;
252  public:
253  typedef typename OP::ReductionType Packet;
254  TeuchosValueTypeReductionOpAdapter(OP op) : _op(op) {}
255  void reduce(const int count, const Packet inBuffer[], Packet inoutBuffer []) const
256  {
257  for (int i=0; i != count; ++i) {
258  inoutBuffer[i] = _op.reduce( inoutBuffer[i], inBuffer[i] );
259  }
260  }
261  };
262 
264  template <class S, class LO, class GO, class Node, class OP>
266  {
267  Kokkos::MultiVector<S,Node> &mv = vec.getLocalMVNonConst();
268  const RCP<Node> node = mv.getNode();
269  // ready data
270  Kokkos::ReadyBufferHelper<Node> rbh(node);
271  rbh.begin();
272  S * out_ptr = rbh.addNonConstBuffer(mv.getValuesNonConst());
273  rbh.end();
274  op.setData(out_ptr);
275  const size_t N = mv.getNumRows();
276  node->template parallel_for(0, N, op);
277  }
278 
280  template <class S1, class S2, class LO, class GO, class Node, class OP>
281  void binary_transform(Vector<S1,LO,GO,Node> &vec_inout, const Vector<S2,LO,GO,Node> &vec_in2, OP op)
282  {
283  Kokkos::MultiVector<S1,Node> &mv_inout = vec_inout.getLocalMVNonConst();
284  const Kokkos::MultiVector<S2,Node> &mv_in2 = vec_in2.getLocalMV();
285  const RCP<Node> node = mv_inout.getNode();
286  // ready data
287  Kokkos::ReadyBufferHelper<Node> rbh(node);
288  rbh.begin();
289  S1 * out_ptr = rbh.addNonConstBuffer(mv_inout.getValuesNonConst());
290  const S2 * in_ptr = rbh.addConstBuffer(mv_in2.getValues());
291  rbh.end();
292  op.setData(out_ptr, in_ptr);
293  const size_t N = mv_inout.getNumRows();
294 #ifdef HAVE_TPETRA_DEBUG
295  TEUCHOS_TEST_FOR_EXCEPTION( mv_in2.getNode() != mv_inout.getNode(), std::runtime_error,
296  "Tpetra::RTI::detail::binary_transform(): multivectors must share the same node.");
297 #endif
298  node->template parallel_for(0, N, op);
299  }
300 
302  template <class S1, class S2, class S3, class LO, class GO, class Node, class OP>
303  void tertiary_transform(Vector<S1,LO,GO,Node> &vec_inout, const Vector<S2,LO,GO,Node> &vec_in2, const Vector<S3,LO,GO,Node> &vec_in3, OP op)
304  {
305  Kokkos::MultiVector<S1,Node> &mv_inout = vec_inout.getLocalMVNonConst();
306  const Kokkos::MultiVector<S2,Node> &mv_in2 = vec_in2.getLocalMV();
307  const Kokkos::MultiVector<S3,Node> &mv_in3 = vec_in3.getLocalMV();
308  const RCP<Node> node = mv_inout.getNode();
309  // ready data
310  Kokkos::ReadyBufferHelper<Node> rbh(node);
311  rbh.begin();
312  S1 * out_ptr = rbh.addNonConstBuffer(mv_inout.getValuesNonConst());
313  const S2 * in_ptr2 = rbh.addConstBuffer(mv_in2.getValues());
314  const S3 * in_ptr3 = rbh.addConstBuffer(mv_in3.getValues());
315  rbh.end();
316  op.setData(out_ptr, in_ptr2, in_ptr3);
317  const size_t N = mv_inout.getNumRows();
318 #ifdef HAVE_TPETRA_DEBUG
319  TEUCHOS_TEST_FOR_EXCEPTION( mv_in2.getNode() != mv_inout.getNode() || mv_in3.getNode() != mv_in2.getNode(), std::runtime_error,
320  "Tpetra::RTI::detail::tertiary_transform(): multivectors must share the same node.");
321 #endif
322  node->template parallel_for(0, N, op);
323  }
324 
326  template <class S, class LO, class GO, class Node, class OP>
327  typename OP::ReductionType
328  reduce(const Vector<S,LO,GO,Node> &vec_in, OP op)
329  {
330  const Kokkos::MultiVector<S,Node> &mv_in = vec_in.getLocalMV();
331  const RCP<Node> node = mv_in.getNode();
332  const RCP<const Teuchos::Comm<int> > comm = vec_in.getMap()->getComm();
333  // ready data
334  Kokkos::ReadyBufferHelper<Node> rbh(node);
335  rbh.begin();
336  const S * in_ptr = rbh.addConstBuffer(mv_in.getValues());
337  rbh.end();
338  op.setData( in_ptr );
339  const size_t N = mv_in.getNumRows();
340  // compute local reduction
341  typename OP::ReductionType gbl_res, lcl_res;
342  lcl_res = node->template parallel_reduce(0, N, op);
343  // compute global reduction
345  Teuchos::reduceAll(*comm, vtrop, 1, &lcl_res, &gbl_res);
346  return gbl_res;
347  }
348 
350  template <class S1, class S2, class LO, class GO, class Node, class OP>
351  typename OP::ReductionType
352  reduce(const Vector<S1,LO,GO,Node> &vec_in1, const Vector<S2,LO,GO,Node> &vec_in2, OP op)
353  {
354  const Kokkos::MultiVector<S1,Node> &mv_in1 = vec_in1.getLocalMV(),
355  &mv_in2 = vec_in2.getLocalMV();
356  const RCP<Node> node = mv_in1.getNode();
357  const RCP<const Teuchos::Comm<int> > comm = vec_in1.getMap()->getComm();
358  // ready data
359  Kokkos::ReadyBufferHelper<Node> rbh(node);
360  rbh.begin();
361  const S1 * in_ptr1 = rbh.addConstBuffer(mv_in1.getValues());
362  const S2 * in_ptr2 = rbh.addConstBuffer(mv_in2.getValues());
363  rbh.end();
364  op.setData( in_ptr1, in_ptr2 );
365  const size_t N = mv_in1.getNumRows();
366 #ifdef HAVE_TPETRA_DEBUG
367  TEUCHOS_TEST_FOR_EXCEPTION( mv_in1.getNode() != mv_in2.getNode(), std::runtime_error,
368  "Tpetra::RTI::detail::reduce(): multivectors must share the same node.");
369 #endif
370  // compute local reduction
371  typename OP::ReductionType gbl_res, lcl_res;
372  lcl_res = node->template parallel_reduce(0, N, op);
373  // compute global reduction
375  Teuchos::reduceAll(*comm, vtrop, 1, &lcl_res, &gbl_res);
376  return gbl_res;
377  }
378 
380  template <class S1, class S2, class S3, class LO, class GO, class Node, class OP>
381  typename OP::ReductionType
382  reduce(const Vector<S1,LO,GO,Node> &vec_in1, const Vector<S2,LO,GO,Node> &vec_in2, const Vector<S3,LO,GO,Node> &vec_in3, OP op)
383  {
384  const Kokkos::MultiVector<S1,Node> &mv_in1 = vec_in1.getLocalMV();
385  const Kokkos::MultiVector<S2,Node> &mv_in2 = vec_in2.getLocalMV();
386  const Kokkos::MultiVector<S3,Node> &mv_in3 = vec_in3.getLocalMV();
387  const RCP<Node> node = mv_in1.getNode();
388  const RCP<const Teuchos::Comm<int> > comm = vec_in1.getMap()->getComm();
389  // ready data
390  Kokkos::ReadyBufferHelper<Node> rbh(node);
391  rbh.begin();
392  const S1 * in_ptr1 = rbh.addConstBuffer(mv_in1.getValues());
393  const S2 * in_ptr2 = rbh.addConstBuffer(mv_in2.getValues());
394  const S3 * in_ptr3 = rbh.addConstBuffer(mv_in3.getValues());
395  rbh.end();
396  op.setData( in_ptr1, in_ptr2, in_ptr3 );
397  const size_t N = mv_in1.getNumRows();
398 #ifdef HAVE_TPETRA_DEBUG
399  TEUCHOS_TEST_FOR_EXCEPTION( mv_in1.getNode() != mv_in2.getNode() || mv_in2.getNode() != mv_in3.getNode(), std::runtime_error,
400  "Tpetra::RTI::detail::reduce(): multivectors must share the same node.");
401 #endif
402  // compute local reduction
403  typename OP::ReductionType gbl_res, lcl_res;
404  lcl_res = node->template parallel_reduce(0, N, op);
405  // compute global reduction
407  Teuchos::reduceAll(*comm, vtrop, 1, &lcl_res, &gbl_res);
408  return gbl_res;
409  }
410 
412  template <class S1, class S2, class LO, class GO, class Node, class OP>
413  typename OP::ReductionType
415  {
416  Kokkos::MultiVector<S1,Node> &mv_inout = vec_inout.getLocalMVNonConst();
417  const Kokkos::MultiVector<S2,Node> &mv_in2 = vec_in2.getLocalMV();
418  const RCP<Node> node = mv_inout.getNode();
419  const RCP<const Teuchos::Comm<int> > comm = vec_inout.getMap()->getComm();
420  // ready data
421  Kokkos::ReadyBufferHelper<Node> rbh(node);
422  rbh.begin();
423  S1 * in_ptr1 = rbh.addNonConstBuffer(mv_inout.getValuesNonConst());
424  const S2 * in_ptr2 = rbh.addConstBuffer(mv_in2.getValues());
425  rbh.end();
426  op.setData( in_ptr1, in_ptr2 );
427  const size_t N = mv_inout.getNumRows();
428 #ifdef HAVE_TPETRA_DEBUG
429  TEUCHOS_TEST_FOR_EXCEPTION( mv_inout.getNode() != mv_in2.getNode(), std::runtime_error,
430  "Tpetra::RTI::detail::transform_reduce(): multivectors must share the same node.");
431 #endif
432  // compute local reduction
433  typename OP::ReductionType gbl_res, lcl_res;
434  lcl_res = node->template parallel_reduce(0, N, op);
435  // compute global reduction
437  Teuchos::reduceAll(*comm, vtrop, 1, &lcl_res, &gbl_res);
438  return gbl_res;
439  }
440 
442  template <class S1, class S2, class S3, class LO, class GO, class Node, class OP>
443  typename OP::ReductionType
444  transform_reduce(Vector<S1,LO,GO,Node> &vec_inout, const Vector<S2,LO,GO,Node> &vec_in2, const Vector<S3,LO,GO,Node> &vec_in3, OP op)
445  {
446  Kokkos::MultiVector<S1,Node> &mv_inout = vec_inout.getLocalMVNonConst();
447  const Kokkos::MultiVector<S2,Node> &mv_in2 = vec_in2.getLocalMV();
448  const Kokkos::MultiVector<S3,Node> &mv_in3 = vec_in3.getLocalMV();
449  const RCP<Node> node = mv_inout.getNode();
450  const RCP<const Teuchos::Comm<int> > comm = vec_inout.getMap()->getComm();
451  // ready data
452  Kokkos::ReadyBufferHelper<Node> rbh(node);
453  rbh.begin();
454  S1 * in_ptr1 = rbh.addNonConstBuffer(mv_inout.getValuesNonConst());
455  const S2 * in_ptr2 = rbh.addConstBuffer(mv_in2.getValues());
456  const S3 * in_ptr3 = rbh.addConstBuffer(mv_in3.getValues());
457  rbh.end();
458  op.setData( in_ptr1, in_ptr2, in_ptr3 );
459  const size_t N = mv_inout.getNumRows();
460 #ifdef HAVE_TPETRA_DEBUG
461  TEUCHOS_TEST_FOR_EXCEPTION( mv_inout.getNode() != mv_in2.getNode() && mv_inout.getNode() != mv_in3.getNode(), std::runtime_error,
462  "Tpetra::RTI::detail::transform_transform(): multivectors must share the same node.");
463 #endif
464  // compute local reduction
465  typename OP::ReductionType gbl_res, lcl_res;
466  lcl_res = node->template parallel_reduce(0, N, op);
467  // compute global reduction
469  Teuchos::reduceAll(*comm, vtrop, 1, &lcl_res, &gbl_res);
470  return gbl_res;
471  }
472 
473  } // end of namespace Tpetra::RTI::detail
474 
475  } // end of namespace Tpetra::RTI
476 
477 } // end of namespace Tpetra
478 
479 #endif // TPETRA_RTI_detail_HPP
Utility base class for kernels used to define Tpetra::Operator objects.
OP::ReductionType transform_reduce(Vector< S1, LO, GO, Node > &vec_inout, const Vector< S2, LO, GO, Node > &vec_in2, OP op)
pass vec_inout and vec_in2 data pointers to \ op, then execute via node parallel_reduce.
adapter class between kernels for Tpetra::RTI::binary_transform and Tpetra::RTI::detail::binary_trans...
void unary_transform(Vector< S, LO, GO, Node > &vec, OP op)
pass vec data pointer to op, then execute via node parallel_for
adapter class between kernels for Tpetra::RTI::binary_pre_transform_reduce and Tpetra::RTI::detail::b...
OP::ReductionType reduce(const Vector< S, LO, GO, Node > &vec_in, OP op)
pass vec_in data pointer to \ op, then execute via node parallel_reduce.
adapter class between kernels for Tpetra::RTI::unary_transform and Tpetra::RTI::detail::unary_transfo...
decorator for Kokkos reduction kernels to satisfy requirements for Teuchos::ValueTypeReductionOp ...
void binary_transform(Vector< S1, LO, GO, Node > &vec_inout, const Vector< S2, LO, GO, Node > &vec_in2, OP op)
pass vec_inout and vec_in2 data pointers to op, then execute via node parallel_for ...
adapter class between kernels for Tpetra::RTI::binary_transform and Tpetra::RTI::detail::binary_trans...
void tertiary_transform(Vector< S1, LO, GO, Node > &vec_inout, const Vector< S2, LO, GO, Node > &vec_in2, const Vector< S3, LO, GO, Node > &vec_in3, OP op)
pass vec_inout, vec_in2 and vec_in3 data pointers to op, then execute via node parallel_for ...
const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & getMap() const
The Map describing the parallel distribution of this object.
adapter class between binary functors and BinaryOp
adapter class between kernels for Tpetra::RTI::tertiary_transform and Tpetra::RTI::detail::tertiary_t...
adapter class between kernels for Tpetra::RTI::binary_transform and Tpetra::RTI::detail::binary_trans...
adapter class between kernels for Tpetra::RTI::binary_transform and Tpetra::RTI::detail::binary_trans...
const Kokkos::MultiVector< Scalar, Node > & getLocalMV() const
Return a const reference to the underlying Kokkos::MultiVector object (advanced use only) ...
adapter class between kernels for Tpetra::RTI::binary_pre_transform_reduce and Tpetra::RTI::detail::b...
A distributed dense vector.
Kokkos::MultiVector< Scalar, Node > & getLocalMVNonConst()
Return a non-const reference to the underlying Kokkos::MultiVector object (advanced use only) ...