Tpetra_NodeOps.hpp

00001 #ifndef TPETRA_NODEOPS_HPP
00002 #define TPETRA_NODEOPS_HPP
00003 
00004 #ifndef KERNEL_PREFIX 
00005   #define KERNEL_PREFIX
00006 #endif
00007 
00008 namespace Tpetra {
00009 
00010   template <class Scalar>
00011   struct InitOp {
00012     Scalar val;
00013     Scalar *x;
00014     inline KERNEL_PREFIX void execute(size_t i) {
00015       x[i] = val;
00016     }
00017   };
00018 
00019   template <class Scalar>
00020   struct ScaleOp {
00021     Scalar val;
00022     Scalar *x;
00023     inline KERNEL_PREFIX void execute(size_t i) {
00024       x[i] *= val;
00025     }
00026   };
00027 
00028 }
00029 
00030 #endif

Generated on Wed May 12 21:40:14 2010 for Tpetra Matrix/Vector Services by  doxygen 1.4.7