Tpetra parallel linear algebra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros 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 
48 #include "Tpetra_Vector.hpp"
49 
50 namespace Tpetra {
51 
52  namespace RTI {
53 
55  namespace detail {
56 
58  template <class S>
60  {
61  protected:
62  S _alpha, _beta;
63  S * _vec_inout;
64  const S * _vec_in2;
65  public:
66  inline StdOpKernel() : _alpha(ScalarTraits<S>::one()), _beta(ScalarTraits<S>::zero()) {}
67  inline void setData(S * vec_inout, const S * vec_in2) { _vec_inout = vec_inout; _vec_in2 = vec_in2; }
68  inline void setAlphaBeta(const S &alpha, const S &beta) { _alpha = alpha; _beta = beta; }
69  };
70 
72  template <class OP, class S>
74  protected:
75  OP _op;
76  S * _vec;
77  public:
78  UnaryFunctorAdapter(OP op) : _op(op) {}
79  inline void setData (S *vec) {
80  _vec = vec;
81  }
82  inline void execute (const int i) const {
83  _vec[i] = _op (_vec[i]);
84  }
85  };
86 
88  template <class OP, class S1, class S2>
90  protected:
91  OP _op;
92  S1 * _vec_inout;
93  const S2 * _vec_in2;
94  public:
95  BinaryFunctorAdapter (OP op) : _op(op) {}
96  inline void setData (S1 *vec_inout, const S2 *vec_in2) {
97  _vec_inout = vec_inout;
98  _vec_in2 = vec_in2;
99  }
100  inline void execute (const int i) const {
101  _vec_inout[i] = _op (_vec_inout[i], _vec_in2[i]);
102  }
103  };
104 
106  template <class OP, class S>
108  protected:
109  OP _op;
110  S * _vec_inout;
111  const S * _vec_in2;
112  public:
113  BinaryFunctorAdapterWithAlphaBeta (OP op) : _op(op) {}
114  inline void setData (S *vec_inout, const S *vec_in2) {
115  _vec_inout = vec_inout;
116  _vec_in2 = vec_in2;
117  }
118  inline void execute (const int i) const {
119  S res = _op (_vec_inout[i], _vec_in2[i]);
120  _vec_inout[i] = this->_alpha * res + this->_beta * _vec_inout[i];
121  }
122  };
123 
125  template <class OP, class S1, class S2, class S3>
127  protected:
128  OP _op;
129  S1 * _vec_inout;
130  const S2 * _vec_in2;
131  const S3 * _vec_in3;
132  public:
133  TertiaryFunctorAdapter (OP op) : _op(op) {}
134  inline void setData (S1 *vec_inout, const S2 *vec_in2, const S3 *vec_in3) {
135  _vec_inout = vec_inout;
136  _vec_in2 = vec_in2;
137  _vec_in3 = vec_in3;
138  }
139  inline void execute (const int i) const {
140  _vec_inout[i] = _op (_vec_inout[i], _vec_in2[i], _vec_in3[i]);
141  }
142  };
143 
145  template <class Glob, class S>
147  public:
148  typedef typename Glob::GenOP GenOP;
149  typedef typename Glob::RedOP RedOP;
150  typedef typename Glob::IdOP IdOP;
151  typedef typename RedOP::result_type ReductionType;
152  protected:
153  GenOP _genop;
154  RedOP _redop;
155  const S * _vec_in;
156  public:
157  RTIReductionAdapter1 (Glob glob) :
158  _genop (glob.genop), _redop (glob.redop)
159  {}
160  inline void setData (const S *vec_in) {
161  _vec_in = vec_in;
162  }
163  inline ReductionType identity () const {
164  return IdOP::identity ();
165  }
166  inline ReductionType generate (const int i) const {
167  return _genop (_vec_in[i]);
168  }
169  inline ReductionType reduce (ReductionType a, ReductionType b) const {
170  return _redop(a, b);
171  }
172  };
173 
175  template <class Glob, class S1, class S2>
177  public:
178  typedef typename Glob::GenOP GenOP;
179  typedef typename Glob::RedOP RedOP;
180  typedef typename Glob::IdOP IdOP;
181  typedef typename RedOP::result_type ReductionType;
182  protected:
183  GenOP _genop;
184  RedOP _redop;
185  const S1 * _vec_in1;
186  const S2 * _vec_in2;
187  public:
188  RTIReductionAdapter2 (Glob glob) :
189  _genop (glob.genop), _redop (glob.redop)
190  {}
191  inline void setData (const S1 *vec_in1, const S2 *vec_in2) {
192  _vec_in1 = vec_in1; _vec_in2 = vec_in2;
193  }
194  inline ReductionType identity () const {
195  return IdOP::identity ();
196  }
197  inline ReductionType generate (const int i) const {
198  return _genop (_vec_in1[i], _vec_in2[i]);
199  }
200  inline ReductionType reduce (ReductionType a, ReductionType b) const {
201  return _redop (a, b);
202  }
203  };
204 
206  template <class Glob, class S1, class S2, class S3>
208  public:
209  typedef typename Glob::GenOP GenOP;
210  typedef typename Glob::RedOP RedOP;
211  typedef typename Glob::IdOP IdOP;
212  typedef typename RedOP::result_type ReductionType;
213  protected:
214  GenOP _genop;
215  RedOP _redop;
216  const S1 * _vec_in1;
217  const S2 * _vec_in2;
218  const S3 * _vec_in3;
219  public:
220  RTIReductionAdapter3 (Glob glob) :
221  _genop (glob.genop), _redop (glob.redop)
222  {}
223  inline void setData (const S1 *vec_in1, const S2 *vec_in2, const S3 *vec_in3) {
224  _vec_in1 = vec_in1; _vec_in2 = vec_in2; _vec_in3 = vec_in3;
225  }
226  inline ReductionType identity () const {
227  return IdOP::identity ();
228  }
229  inline ReductionType generate (const int i) const {
230  return _genop (_vec_in1[i], _vec_in2[i], _vec_in3[i]);
231  }
232  inline ReductionType reduce (ReductionType a, ReductionType b) const {
233  return _redop (a, b);
234  }
235  };
236 
238  template <class Glob, class S1, class S2>
240  public:
241  typedef typename Glob::TOP TOP;
242  typedef typename Glob::GenOP GenOP;
243  typedef typename Glob::RedOP RedOP;
244  typedef typename Glob::IdOP IdOP;
245  typedef typename RedOP::result_type ReductionType;
246  protected:
247  TOP _top;
248  GenOP _genop;
249  RedOP _redop;
250  S1 * _vec_inout;
251  const S2 * _vec_in2;
252  public:
253  RTIPreTransformReductionAdapter (Glob glob) :
254  _top (glob.top), _genop (glob.genop), _redop (glob.redop)
255  {}
256  inline void setData (S1 *vec_inout, const S2 *vec_in2) {
257  _vec_inout = vec_inout;
258  _vec_in2 = vec_in2;
259  }
260  inline ReductionType identity () const {
261  return IdOP::identity ();
262  }
263  inline ReductionType reduce (ReductionType a, ReductionType b) const {
264  return _redop (a, b);
265  }
266  inline ReductionType generate (const int i) const {
267  _vec_inout[i] = _top (_vec_inout[i], _vec_in2[i]);
268  return _genop (_vec_inout[i], _vec_in2[i]);
269  }
270  };
271 
273  template <class Glob, class S1, class S2, class S3>
275  public:
276  typedef typename Glob::TOP TOP;
277  typedef typename Glob::GenOP GenOP;
278  typedef typename Glob::RedOP RedOP;
279  typedef typename Glob::IdOP IdOP;
280  typedef typename RedOP::result_type ReductionType;
281  protected:
282  TOP _top;
283  GenOP _genop;
284  RedOP _redop;
285  S1 * _vec_inout;
286  const S2 * _vec_in2;
287  const S3 * _vec_in3;
288  public:
290  _top (glob.top), _genop (glob.genop), _redop (glob.redop)
291  {}
292  inline void setData (S1 *vec_inout, const S2 *vec_in2, const S3 *vec_in3) {
293  _vec_inout = vec_inout;
294  _vec_in2 = vec_in2;
295  _vec_in3 = vec_in3;
296  }
297  inline ReductionType identity () const {
298  return IdOP::identity ();
299  }
300  inline ReductionType reduce (ReductionType a, ReductionType b) const {
301  return _redop (a, b);
302  }
303  inline ReductionType generate (const int i) const {
304  _vec_inout[i] = _top (_vec_inout[i], _vec_in2[i], _vec_in3[i]);
305  return _genop (_vec_inout[i], _vec_in2[i], _vec_in3[i]);
306  }
307  };
308 
310  template <class OP>
312  public Teuchos::ValueTypeReductionOp<int,typename OP::ReductionType> {
313  protected:
314  mutable OP _op;
315  public:
316  typedef typename OP::ReductionType Packet;
317  TeuchosValueTypeReductionOpAdapter (OP op) : _op(op) {}
318  void reduce (const int count, const Packet inBuffer[], Packet inoutBuffer []) const
319  {
320  for (int i = 0; i != count; ++i) {
321  inoutBuffer[i] = _op.reduce (inoutBuffer[i], inBuffer[i]);
322  }
323  }
324  };
325 
327  template <class S, class LO, class GO, class Node, class OP>
329  {
330  KokkosClassic::MultiVector<S,Node> mv = vec.getLocalMV ();
331  const RCP<Node> node = mv.getNode();
332  // ready data
333  KokkosClassic::ReadyBufferHelper<Node> rbh(node);
334  rbh.begin();
335  S * out_ptr = rbh.addNonConstBuffer(mv.getValuesNonConst());
336  rbh.end();
337  op.setData(out_ptr);
338  const size_t N = mv.getNumRows();
339  node->template parallel_for (0, N, op);
340  }
341 
343  template <class S1, class S2, class LO, class GO, class Node, class OP>
344  void binary_transform (Vector<S1,LO,GO,Node> &vec_inout, const Vector<S2,LO,GO,Node> &vec_in2, OP op)
345  {
346  KokkosClassic::MultiVector<S1,Node> mv_inout = vec_inout.getLocalMV ();
347  KokkosClassic::MultiVector<S2,Node> mv_in2 = vec_in2.getLocalMV ();
348  const RCP<Node> node = mv_inout.getNode();
349  // ready data
350  KokkosClassic::ReadyBufferHelper<Node> rbh(node);
351  rbh.begin();
352  S1 * out_ptr = rbh.addNonConstBuffer(mv_inout.getValuesNonConst());
353  const S2 * in_ptr = rbh.addConstBuffer(mv_in2.getValues());
354  rbh.end();
355  op.setData(out_ptr, in_ptr);
356  const size_t N = mv_inout.getNumRows();
357 #ifdef HAVE_TPETRA_DEBUG
358  TEUCHOS_TEST_FOR_EXCEPTION( mv_in2.getNode() != mv_inout.getNode(), std::runtime_error,
359  "Tpetra::RTI::detail::binary_transform(): multivectors must share the same node.");
360 #endif
361  node->template parallel_for(0, N, op);
362  }
363 
365  template <class S1, class S2, class S3, class LO, class GO, class Node, class OP>
366  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)
367  {
368  KokkosClassic::MultiVector<S1,Node> mv_inout = vec_inout.getLocalMV ();
369  KokkosClassic::MultiVector<S2,Node> mv_in2 = vec_in2.getLocalMV ();
370  KokkosClassic::MultiVector<S3,Node> mv_in3 = vec_in3.getLocalMV ();
371  const RCP<Node> node = mv_inout.getNode();
372  // ready data
373  KokkosClassic::ReadyBufferHelper<Node> rbh(node);
374  rbh.begin();
375  S1 * out_ptr = rbh.addNonConstBuffer(mv_inout.getValuesNonConst());
376  const S2 * in_ptr2 = rbh.addConstBuffer(mv_in2.getValues());
377  const S3 * in_ptr3 = rbh.addConstBuffer(mv_in3.getValues());
378  rbh.end();
379  op.setData(out_ptr, in_ptr2, in_ptr3);
380  const size_t N = mv_inout.getNumRows();
381 #ifdef HAVE_TPETRA_DEBUG
382  TEUCHOS_TEST_FOR_EXCEPTION( mv_in2.getNode() != mv_inout.getNode() || mv_in3.getNode() != mv_in2.getNode(), std::runtime_error,
383  "Tpetra::RTI::detail::tertiary_transform(): multivectors must share the same node.");
384 #endif
385  node->template parallel_for(0, N, op);
386  }
387 
389  template <class S, class LO, class GO, class Node, class OP>
390  typename OP::ReductionType
391  reduce(const Vector<S,LO,GO,Node> &vec_in, OP op)
392  {
393  const KokkosClassic::MultiVector<S,Node> &mv_in = vec_in.getLocalMV();
394  const RCP<Node> node = mv_in.getNode();
395  const RCP<const Teuchos::Comm<int> > comm = vec_in.getMap()->getComm();
396  // ready data
397  KokkosClassic::ReadyBufferHelper<Node> rbh(node);
398  rbh.begin();
399  const S * in_ptr = rbh.addConstBuffer(mv_in.getValues());
400  rbh.end();
401  op.setData( in_ptr );
402  const size_t N = mv_in.getNumRows();
403  // compute local reduction
404  typename OP::ReductionType gbl_res, lcl_res;
405  lcl_res = node->template parallel_reduce(0, N, op);
406  // compute global reduction
408  Teuchos::reduceAll(*comm, vtrop, 1, &lcl_res, &gbl_res);
409  return gbl_res;
410  }
411 
413  template <class S1, class S2, class LO, class GO, class Node, class OP>
414  typename OP::ReductionType
415  reduce(const Vector<S1,LO,GO,Node> &vec_in1, const Vector<S2,LO,GO,Node> &vec_in2, OP op)
416  {
417  const KokkosClassic::MultiVector<S1,Node> &mv_in1 = vec_in1.getLocalMV(),
418  &mv_in2 = vec_in2.getLocalMV();
419  const RCP<Node> node = mv_in1.getNode();
420  const RCP<const Teuchos::Comm<int> > comm = vec_in1.getMap()->getComm();
421  // ready data
422  KokkosClassic::ReadyBufferHelper<Node> rbh(node);
423  rbh.begin();
424  const S1 * in_ptr1 = rbh.addConstBuffer(mv_in1.getValues());
425  const S2 * in_ptr2 = rbh.addConstBuffer(mv_in2.getValues());
426  rbh.end();
427  op.setData( in_ptr1, in_ptr2 );
428  const size_t N = mv_in1.getNumRows();
429 #ifdef HAVE_TPETRA_DEBUG
430  TEUCHOS_TEST_FOR_EXCEPTION( mv_in1.getNode() != mv_in2.getNode(), std::runtime_error,
431  "Tpetra::RTI::detail::reduce(): multivectors must share the same node.");
432 #endif
433  // compute local reduction
434  typename OP::ReductionType gbl_res, lcl_res;
435  lcl_res = node->template parallel_reduce(0, N, op);
436  // compute global reduction
438  Teuchos::reduceAll(*comm, vtrop, 1, &lcl_res, &gbl_res);
439  return gbl_res;
440  }
441 
443  template <class S1, class S2, class S3, class LO, class GO, class Node, class OP>
444  typename OP::ReductionType
445  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)
446  {
447  const KokkosClassic::MultiVector<S1,Node> &mv_in1 = vec_in1.getLocalMV();
448  const KokkosClassic::MultiVector<S2,Node> &mv_in2 = vec_in2.getLocalMV();
449  const KokkosClassic::MultiVector<S3,Node> &mv_in3 = vec_in3.getLocalMV();
450  const RCP<Node> node = mv_in1.getNode();
451  const RCP<const Teuchos::Comm<int> > comm = vec_in1.getMap()->getComm();
452  // ready data
453  KokkosClassic::ReadyBufferHelper<Node> rbh(node);
454  rbh.begin();
455  const S1 * in_ptr1 = rbh.addConstBuffer(mv_in1.getValues());
456  const S2 * in_ptr2 = rbh.addConstBuffer(mv_in2.getValues());
457  const S3 * in_ptr3 = rbh.addConstBuffer(mv_in3.getValues());
458  rbh.end();
459  op.setData( in_ptr1, in_ptr2, in_ptr3 );
460  const size_t N = mv_in1.getNumRows();
461 #ifdef HAVE_TPETRA_DEBUG
462  TEUCHOS_TEST_FOR_EXCEPTION( mv_in1.getNode() != mv_in2.getNode() || mv_in2.getNode() != mv_in3.getNode(), std::runtime_error,
463  "Tpetra::RTI::detail::reduce(): multivectors must share the same node.");
464 #endif
465  // compute local reduction
466  typename OP::ReductionType gbl_res, lcl_res;
467  lcl_res = node->template parallel_reduce(0, N, op);
468  // compute global reduction
470  Teuchos::reduceAll(*comm, vtrop, 1, &lcl_res, &gbl_res);
471  return gbl_res;
472  }
473 
475  template <class S1, class S2, class LO, class GO, class Node, class OP>
476  typename OP::ReductionType
478  {
479  KokkosClassic::MultiVector<S1,Node> mv_inout = vec_inout.getLocalMV ();
480  KokkosClassic::MultiVector<S2,Node> mv_in2 = vec_in2.getLocalMV ();
481  const RCP<Node> node = mv_inout.getNode();
482  const RCP<const Teuchos::Comm<int> > comm = vec_inout.getMap()->getComm();
483  // ready data
484  KokkosClassic::ReadyBufferHelper<Node> rbh(node);
485  rbh.begin();
486  S1 * in_ptr1 = rbh.addNonConstBuffer(mv_inout.getValuesNonConst());
487  const S2 * in_ptr2 = rbh.addConstBuffer(mv_in2.getValues());
488  rbh.end();
489  op.setData( in_ptr1, in_ptr2 );
490  const size_t N = mv_inout.getNumRows();
491 #ifdef HAVE_TPETRA_DEBUG
492  TEUCHOS_TEST_FOR_EXCEPTION( mv_inout.getNode() != mv_in2.getNode(), std::runtime_error,
493  "Tpetra::RTI::detail::transform_reduce(): multivectors must share the same node.");
494 #endif
495  // compute local reduction
496  typename OP::ReductionType gbl_res, lcl_res;
497  lcl_res = node->template parallel_reduce(0, N, op);
498  // compute global reduction
500  Teuchos::reduceAll(*comm, vtrop, 1, &lcl_res, &gbl_res);
501  return gbl_res;
502  }
503 
505  template <class S1, class S2, class S3, class LO, class GO, class Node, class OP>
506  typename OP::ReductionType
507  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)
508  {
509  KokkosClassic::MultiVector<S1,Node> mv_inout = vec_inout.getLocalMV ();
510  KokkosClassic::MultiVector<S2,Node> mv_in2 = vec_in2.getLocalMV ();
511  KokkosClassic::MultiVector<S3,Node> mv_in3 = vec_in3.getLocalMV ();
512  const RCP<Node> node = mv_inout.getNode();
513  const RCP<const Teuchos::Comm<int> > comm = vec_inout.getMap()->getComm();
514  // ready data
515  KokkosClassic::ReadyBufferHelper<Node> rbh(node);
516  rbh.begin();
517  S1 * in_ptr1 = rbh.addNonConstBuffer(mv_inout.getValuesNonConst());
518  const S2 * in_ptr2 = rbh.addConstBuffer(mv_in2.getValues());
519  const S3 * in_ptr3 = rbh.addConstBuffer(mv_in3.getValues());
520  rbh.end();
521  op.setData( in_ptr1, in_ptr2, in_ptr3 );
522  const size_t N = mv_inout.getNumRows();
523 #ifdef HAVE_TPETRA_DEBUG
524  TEUCHOS_TEST_FOR_EXCEPTION( mv_inout.getNode() != mv_in2.getNode() && mv_inout.getNode() != mv_in3.getNode(), std::runtime_error,
525  "Tpetra::RTI::detail::transform_transform(): multivectors must share the same node.");
526 #endif
527  // compute local reduction
528  typename OP::ReductionType gbl_res, lcl_res;
529  lcl_res = node->template parallel_reduce(0, N, op);
530  // compute global reduction
532  Teuchos::reduceAll(*comm, vtrop, 1, &lcl_res, &gbl_res);
533  return gbl_res;
534  }
535 
536  } // end of namespace Tpetra::RTI::detail
537 
538  } // end of namespace Tpetra::RTI
539 
540 } // end of namespace Tpetra
541 
542 #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 ...
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...
adapter class between kernels for Tpetra::RTI::binary_pre_transform_reduce and Tpetra::RTI::detail::b...
A distributed dense vector.
virtual Teuchos::RCP< const map_type > getMap() const
The Map describing the parallel distribution of this object.