PARALUTION  1.0.0
PARALUTION
host_stencil_laplace2d.hpp
Go to the documentation of this file.
1 #ifndef PARALUTION_HOST_STENCIL_LAPLACE2D_HPP_
2 #define PARALUTION_HOST_STENCIL_LAPLACE2D_HPP_
3 
4 #include "../base_vector.hpp"
5 #include "../base_stencil.hpp"
6 #include "../stencil_types.hpp"
7 
8 namespace paralution {
9 
10 template <typename ValueType>
11 class HostStencilLaplace2D : public HostStencil<ValueType> {
12 
13 public:
14 
16  HostStencilLaplace2D(const Paralution_Backend_Descriptor local_backend);
17  virtual ~HostStencilLaplace2D();
18 
19  virtual int get_nnz(void) const;
20  virtual void info(void) const;
21  virtual unsigned int get_stencil_id(void) const { return Laplace2D; }
22 
23 
24  virtual void Apply(const BaseVector<ValueType> &in, BaseVector<ValueType> *out) const;
25  virtual void ApplyAdd(const BaseVector<ValueType> &in, const ValueType scalar,
26  BaseVector<ValueType> *out) const;
27 
28 private:
29 
30  friend class BaseVector<ValueType>;
31  friend class HostVector<ValueType>;
32 
33  // friend class GPUAcceleratorStencilLaplace2D<ValueType>;
34  // friend class OCLAcceleratorStencilLaplace2D<ValueType>;
35  // friend class MICAcceleratorStencilLaplace2D<ValueType>;
36 
37 };
38 
39 
40 }
41 
42 #endif // PARALUTION_HOST_STENCIL_LAPLACE2D_HPP_
virtual unsigned int get_stencil_id(void) const
Return the stencil format id (see stencil_formats.hpp)
Definition: host_stencil_laplace2d.hpp:21
Definition: stencil_types.hpp:12
virtual ~HostStencilLaplace2D()
Definition: host_stencil_laplace2d.cpp:39
virtual int get_nnz(void) const
Return the nnz per row.
Definition: host_stencil_laplace2d.cpp:54
const IndexType const IndexType const IndexType const ValueType const ValueType scalar
Definition: cuda_kernels_coo.hpp:91
Definition: base_vector.hpp:10
virtual void info(void) const
Shows simple info about the object.
Definition: host_stencil_laplace2d.cpp:47
Definition: backend_manager.cpp:43
HostStencilLaplace2D()
Definition: host_stencil_laplace2d.cpp:19
Base class for all host/accelerator vectors.
Definition: base_vector.hpp:26
virtual void Apply(const BaseVector< ValueType > &in, BaseVector< ValueType > *out) const
Apply the stencil to vector, out = this*in;.
Definition: host_stencil_laplace2d.cpp:60
virtual void ApplyAdd(const BaseVector< ValueType > &in, const ValueType scalar, BaseVector< ValueType > *out) const
Apply and add the stencil to vector, out = out + scalar*this*in;.
Definition: host_stencil_laplace2d.cpp:165