16 #ifndef dealii_cuda_vector_h 17 #define dealii_cuda_vector_h 19 #include <deal.II/base/config.h> 20 #include <deal.II/base/exceptions.h> 21 #include <deal.II/base/index_set.h> 22 #include <deal.II/lac/vector_space_vector.h> 23 #include <deal.II/lac/vector_operation.h> 25 #ifdef DEAL_II_WITH_CUDA 27 DEAL_II_NAMESPACE_OPEN
29 class CommunicationPatternBase;
30 template <
typename Number>
class ReadWriteVector;
49 template <
typename Number>
53 typedef typename VectorSpaceVector<Number>::value_type value_type;
54 typedef typename VectorSpaceVector<Number>::size_type size_type;
55 typedef typename VectorSpaceVector<Number>::real_type real_type;
77 explicit Vector(
const size_type n);
89 void reinit(
const size_type n,
90 const bool omit_zeroing_entries =
false);
97 const bool omit_zeroing_entries =
false)
override;
109 std::shared_ptr<const CommunicationPatternBase> communication_pattern =
110 std::shared_ptr<const CommunicationPatternBase> ())
override;
146 virtual void add(
const Number a)
override;
163 virtual void sadd(
const Number s,
const Number a,
181 virtual bool all_zero()
const override;
186 virtual value_type
mean_value()
const override;
192 virtual real_type
l1_norm()
const override;
198 virtual real_type
l2_norm()
const override;
237 virtual size_type
size()
const override;
248 virtual void print(std::ostream &out,
249 const unsigned int precision=2,
250 const bool scientific=
true,
251 const bool across=
true)
const override;
280 template <
typename Number>
289 template <
typename Number>
297 template <
typename Number>
301 return complete_index_set(n_elements);
306 DEAL_II_NAMESPACE_CLOSE
virtual Number add_and_dot(const Number a, const VectorSpaceVector< Number > &V, const VectorSpaceVector< Number > &W) override
virtual void equ(const Number a, const VectorSpaceVector< Number > &V) override
void reinit(const size_type n, const bool omit_zeroing_entries=false)
Number * get_values() const
virtual Vector< Number > & operator-=(const VectorSpaceVector< Number > &V) override
virtual real_type l1_norm() const override
virtual value_type mean_value() const override
virtual ::IndexSet locally_owned_elements() const override
virtual void add(const Number a) override
#define DeclException0(Exception0)
static ::ExceptionBase & ExcVectorTypeNotCompatible()
virtual Vector< Number > & operator*=(const Number factor) override
virtual bool all_zero() const override
virtual Number operator*(const VectorSpaceVector< Number > &V) const override
virtual Vector< Number > & operator/=(const Number factor) override
virtual std::size_t memory_consumption() const override
virtual real_type l2_norm() const override
virtual Vector< Number > & operator+=(const VectorSpaceVector< Number > &V) override
virtual void scale(const VectorSpaceVector< Number > &scaling_factors) override
virtual Vector< Number > & operator=(const Number s) override
virtual void sadd(const Number s, const Number a, const VectorSpaceVector< Number > &V) override
virtual void print(std::ostream &out, const unsigned int precision=2, const bool scientific=true, const bool across=true) const override
virtual size_type size() const override
virtual real_type linfty_norm() const override