Ginkgo  Generated from pipelines/164546034 branch based on develop. Ginkgo version 1.2.0
A numerical linear algebra library targeting many-core architectures
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
gko Namespace Reference

The Ginkgo namespace. More...

Namespaces

 accessor
 The accessor namespace.
 
 factorization
 The Factorization namespace.
 
 log
 The logger namespace .
 
 matrix
 The matrix namespace.
 
 name_demangling
 The name demangling namespace.
 
 preconditioner
 The Preconditioner namespace.
 
 solver
 The ginkgo Solve namespace.
 
 stop
 The Stopping criterion namespace.
 
 syn
 The Synthesizer namespace.
 
 xstd
 The namespace for functionalities after C++11 standard.
 

Classes

class  AbstractFactory
 The AbstractFactory is a generic interface template that enables easy implementation of the abstract factory design pattern. More...
 
class  AllocationError
 AllocationError is thrown if a memory allocation fails. More...
 
class  Array
 An Array is a container which encapsulates fixed-sized arrays, stored on the Executor tied to the Array. More...
 
class  BadDimension
 BadDimension is thrown if an operation is being applied to a LinOp with bad dimensions. More...
 
class  Combination
 The Combination class can be used to construct a linear combination of multiple linear operators c1 * op1 + c2 * op2 + ... More...
 
class  Composition
 The Composition class can be used to compose linear operators op1, op2, ..., opn and obtain the operator op1 * op2 * ... More...
 
class  ConvertibleTo
 ConvertibleTo interface is used to mark that the implementer can be converted to the object of ResultType. More...
 
class  copy_back_deleter
 A copy_back_deleter is a type of deleter that copies the data to an internally referenced object before performing the deletion. More...
 
class  copy_back_deleter< const T >
 
struct  cpx_real_type
 Access the underlying real type of a complex number. More...
 
struct  cpx_real_type< std::complex< T > >
 Specialization for complex types.
 
class  CublasError
 CublasError is thrown when a cuBLAS routine throws a non-zero error code. More...
 
class  CudaError
 CudaError is thrown when a CUDA routine throws a non-zero error code. More...
 
class  CudaExecutor
 This is the Executor subclass which represents the CUDA device. More...
 
class  CusparseError
 CusparseError is thrown when a cuSPARSE routine throws a non-zero error code. More...
 
struct  default_converter
 Used to convert objects of type S to objects of type R using static_cast. More...
 
struct  dim
 A type representing the dimensions of a multidimensional object. More...
 
struct  dim< 1u, DimensionType >
 
class  DimensionMismatch
 DimensionMismatch is thrown if an operation is being applied to LinOps of incompatible size. More...
 
struct  enable_parameters_type
 The enable_parameters_type mixin is used to create a base implementation of the factory parameters structure. More...
 
class  EnableAbstractPolymorphicObject
 This mixin inherits from (a subclass of) PolymorphicObject and provides a base implementation of a new abstract object. More...
 
class  EnableCreateMethod
 This mixin implements a static create() method on ConcreteType that dynamically allocates the memory, uses the passed-in arguments to construct the object, and returns an std::unique_ptr to such an object. More...
 
class  EnableDefaultFactory
 This mixin provides a default implementation of a concrete factory. More...
 
class  EnableLinOp
 The EnableLinOp mixin can be used to provide sensible default implementations of the majority of the LinOp and PolymorphicObject interface. More...
 
class  EnablePolymorphicAssignment
 This mixin is used to enable a default PolymorphicObject::copy_from() implementation for objects that have implemented conversions between them. More...
 
class  EnablePolymorphicObject
 This mixin inherits from (a subclass of) PolymorphicObject and provides a base implementation of a new concrete polymorphic object. More...
 
class  Error
 The Error class is used to report exceptional behaviour in library functions. More...
 
class  Executor
 The first step in using the Ginkgo library consists of creating an executor. More...
 
class  executor_deleter
 This is a deleter that uses an executor's free method to deallocate the data. More...
 
class  executor_deleter< T[]>
 
class  HipblasError
 HipblasError is thrown when a hipBLAS routine throws a non-zero error code. More...
 
class  HipError
 HipError is thrown when a HIP routine throws a non-zero error code. More...
 
class  HipExecutor
 This is the Executor subclass which represents the HIP enhanced device. More...
 
class  HipsparseError
 HipsparseError is thrown when a hipSPARSE routine throws a non-zero error code. More...
 
class  KernelNotFound
 KernelNotFound is thrown if Ginkgo cannot find a kernel which satisfies the criteria imposed by the input arguments. More...
 
class  LinOp
 
class  LinOpFactory
 A LinOpFactory represents a higher order mapping which transforms one linear operator into another. More...
 
struct  matrix_data
 This structure is used as an intermediate data type to store a sparse matrix. More...
 
class  NotCompiled
 NotCompiled is thrown when attempting to call an operation which is a part of a module that was not compiled on the system. More...
 
class  NotImplemented
 NotImplemented is thrown in case an operation has not yet been implemented (but will be implemented in the future). More...
 
class  NotSupported
 NotSupported is thrown in case it is not possible to perform the requested operation on the given object type. More...
 
class  null_deleter
 This is a deleter that does not delete the object. More...
 
class  null_deleter< T[]>
 
class  OmpExecutor
 This is the Executor subclass which represents the OpenMP device (typically CPU). More...
 
class  Operation
 Operations can be used to define functionalities whose implementations differ among devices. More...
 
class  OutOfBoundsError
 OutOfBoundsError is thrown if a memory access is detected to be out-of-bounds. More...
 
class  Permutable
 Linear operators which support permutation should implement the Permutable interface. More...
 
class  Perturbation
 The Perturbation class can be used to construct a LinOp to represent the operation (identity + scalar * basis * projector). More...
 
class  PolymorphicObject
 A PolymorphicObject is the abstract base for all "heavy" objects in Ginkgo that behave polymorphically. More...
 
class  precision_reduction
 This class is used to encode storage precisions of low precision algorithms. More...
 
class  Preconditionable
 A LinOp implementing this interface can be preconditioned. More...
 
class  range
 A range is a multidimensional view of the memory. More...
 
class  ReadableFromMatrixData
 A LinOp implementing this interface can read its data from a matrix_data structure. More...
 
class  ReferenceExecutor
 This is a specialization of the OmpExecutor, which runs the reference implementations of the kernels used for debugging purposes. More...
 
struct  span
 A span is a lightweight structure used to create sub-ranges from other ranges. More...
 
class  stopping_status
 This class is used to keep track of the stopping status of one vector. More...
 
class  StreamError
 StreamError is thrown if accessing a stream failed. More...
 
class  temporary_clone
 A temporary_clone is a special smart pointer-like object that is designed to hold an object temporarily copied to another executor. More...
 
class  Transposable
 Linear operators which support transposition should implement the Transposable interface. More...
 
class  truncated
 
class  ValueMismatch
 ValueMismatch is thrown if two values are not equal. More...
 
struct  version
 This structure is used to represent versions of various Ginkgo modules. More...
 
class  version_info
 Ginkgo uses version numbers to label new features and to communicate backward compatibility guarantees: More...
 
class  WritableToMatrixData
 A LinOp implementing this interface can write its data to a matrix_data structure. More...
 

Typedefs

template<typename ConcreteFactory , typename ConcreteLinOp , typename ParametersType , typename PolymorphicBase = LinOpFactory>
using EnableDefaultLinOpFactory = EnableDefaultFactory< ConcreteFactory, ConcreteLinOp, ParametersType, PolymorphicBase >
 This is an alias for the EnableDefaultFactory mixin, which correctly sets the template parameters to enable a subclass of LinOpFactory. More...
 
template<typename T >
using remove_complex = typename detail::remove_complex_impl< T >::type
 Obtains a real counterpart of a std::complex type, and leaves the type unchanged if it is not a complex type.
 
template<typename T >
using is_complex_s = detail::is_complex_impl< T >
 Allows to check if T is a complex value during compile time by accessing the value attribute of this struct. More...
 
template<typename T >
using next_precision = typename detail::next_precision_impl< T >::type
 Obtains the next type in the singly-linked precision list.
 
template<typename T >
using reduce_precision = typename detail::reduce_precision_impl< T >::type
 Obtains the next type in the hierarchy with lower precision than T.
 
template<typename T >
using increase_precision = typename detail::increase_precision_impl< T >::type
 Obtains the next type in the hierarchy with higher precision than T.
 
template<typename T , size_type Limit = sizeof(uint16) * byte_size>
using truncate_type = xstd::conditional_t< detail::type_size_impl< T >::value >=2 *Limit, typename detail::truncate_type_impl< T >::type, T >
 Truncates the type by half (by dropping bits), but ensures that it is at least Limit bits wide.
 
using size_type = std::size_t
 Integral type used for allocation quantities.
 
using int8 = std::int8_t
 8-bit signed integral type.
 
using int16 = std::int16_t
 16-bit signed integral type.
 
using int32 = std::int32_t
 32-bit signed integral type.
 
using int64 = std::int64_t
 64-bit signed integral type.
 
using uint8 = std::uint8_t
 8-bit unsigned integral type.
 
using uint16 = std::uint16_t
 16-bit unsigned integral type.
 
using uint32 = std::uint32_t
 32-bit unsigned integral type.
 
using uint64 = std::uint64_t
 64-bit unsigned integral type.
 
using uintptr = std::uintptr_t
 
using float16 = half
 Half precision floating point type.
 
using float32 = float
 Single precision floating point type.
 
using float64 = double
 Double precision floating point type.
 
using full_precision = double
 The most precise floating-point type.
 
using default_precision = double
 Precision used if no precision is explicitly specified.
 

Enumerations

enum  layout_type { layout_type::array, layout_type::coordinate }
 Specifies the layout type when writing data in matrix market format. More...
 

Functions

template<size_type Dimensionality, typename DimensionType >
constexpr bool operator!= (const dim< Dimensionality, DimensionType > &x, const dim< Dimensionality, DimensionType > &y)
 Checks if two dim objects are different. More...
 
template<typename DimensionType >
constexpr dim< 2, DimensionType > transpose (const dim< 2, DimensionType > &dimensions) noexcept
 Returns a dim<2> object with its dimensions swapped. More...
 
template<typename T >
constexpr bool is_complex ()
 Checks if T is a complex type. More...
 
template<typename T >
constexpr reduce_precision< T > round_down (T val)
 Reduces the precision of the input parameter. More...
 
template<typename T >
constexpr increase_precision< T > round_up (T val)
 Increases the precision of the input parameter. More...
 
constexpr int64 ceildiv (int64 num, int64 den)
 Performs integer division with rounding up. More...
 
template<typename T >
constexpr T zero ()
 Returns the additive identity for T. More...
 
template<typename T >
constexpr T zero (const T &)
 Returns the additive identity for T. More...
 
template<typename T >
constexpr T one ()
 Returns the multiplicative identity for T. More...
 
template<typename T >
constexpr T one (const T &)
 Returns the multiplicative identity for T. More...
 
template<typename T >
constexpr T abs (const T &x)
 Returns the absolute value of the object. More...
 
template<typename T >
constexpr T max (const T &x, const T &y)
 Returns the larger of the arguments. More...
 
template<typename T >
constexpr T min (const T &x, const T &y)
 Returns the smaller of the arguments. More...
 
template<typename T >
constexpr xstd::enable_if_t<!is_complex_s< T >::value, T > real (const T &x)
 Returns the real part of the object. More...
 
template<typename T >
constexpr xstd::enable_if_t< is_complex_s< T >::value, remove_complex< T > > real (const T &x)
 
template<typename T >
constexpr xstd::enable_if_t<!is_complex_s< T >::value, T > imag (const T &)
 Returns the imaginary part of the object. More...
 
template<typename T >
constexpr xstd::enable_if_t< is_complex_s< T >::value, remove_complex< T > > imag (const T &x)
 
template<typename T >
xstd::enable_if_t<!is_complex_s< T >::value, T > conj (const T &x)
 Returns the conjugate of an object. More...
 
template<typename T >
xstd::enable_if_t< is_complex_s< T >::value, T > conj (const T &x)
 
template<typename T >
constexpr auto squared_norm (const T &x) -> decltype(real(conj(x) *x))
 Returns the squared norm of the object. More...
 
template<typename T >
constexpr uint32 get_significant_bit (const T &n, uint32 hint=0u) noexcept
 Returns the position of the most significant bit of the number. More...
 
template<typename T >
constexpr T get_superior_power (const T &base, const T &limit, const T &hint=T{1}) noexcept
 Returns the smallest power of base not smaller than limit. More...
 
template<typename T >
xstd::enable_if_t<!is_complex_s< T >::value, bool > is_finite (const T &value)
 Checks if a floating point number is finite, meaning it is neither +/- infinity nor NaN. More...
 
template<typename T >
xstd::enable_if_t< is_complex_s< T >::value, bool > is_finite (const T &value)
 Checks if all components of a complex value are finite, meaning they are neither +/- infinity nor NaN. More...
 
template<typename ValueType = default_precision, typename IndexType = int32>
matrix_data< ValueType, IndexType > read_raw (std::istream &is)
 Reads a matrix stored in matrix market format from an input stream. More...
 
template<typename ValueType , typename IndexType >
void write_raw (std::ostream &os, const matrix_data< ValueType, IndexType > &data, layout_type layout=layout_type::array)
 Writes a matrix_data structure to a stream in matrix market format. More...
 
template<typename MatrixType , typename StreamType , typename... MatrixArgs>
std::unique_ptr< MatrixType > read (StreamType &&is, MatrixArgs &&... args)
 Reads a matrix stored in matrix market format from an input stream. More...
 
template<typename MatrixType , typename StreamType >
void write (StreamType &&os, MatrixType *matrix, layout_type layout=layout_type::array)
 Reads a matrix stored in matrix market format from an input stream. More...
 
template<typename R , typename T >
std::unique_ptr< R, std::function< void(R *)> > copy_and_convert_to (std::shared_ptr< const Executor > exec, T *obj)
 Converts the object to R and places it on Executor exec. More...
 
template<typename R , typename T >
std::unique_ptr< const R, std::function< void(const R *)> > copy_and_convert_to (std::shared_ptr< const Executor > exec, const T *obj)
 Converts the object to R and places it on Executor exec. More...
 
template<typename R , typename T >
std::shared_ptr< R > copy_and_convert_to (std::shared_ptr< const Executor > exec, std::shared_ptr< T > obj)
 Converts the object to R and places it on Executor exec. More...
 
template<typename R , typename T >
std::shared_ptr< const R > copy_and_convert_to (std::shared_ptr< const Executor > exec, std::shared_ptr< const T > obj)
 
constexpr bool operator< (const span &first, const span &second)
 
constexpr bool operator<= (const span &first, const span &second)
 
constexpr bool operator> (const span &first, const span &second)
 
constexpr bool operator>= (const span &first, const span &second)
 
constexpr bool operator== (const span &first, const span &second)
 
constexpr bool operator!= (const span &first, const span &second)
 
template<typename Accessor >
constexpr range< accessor::unary_plus< Accessor > > operator+ (const range< Accessor > &operand)
 
template<typename Accessor >
constexpr range< accessor::unary_minus< Accessor > > operator- (const range< Accessor > &operand)
 
template<typename Accessor >
constexpr range< accessor::logical_not< Accessor > > operator! (const range< Accessor > &operand)
 
template<typename Accessor >
constexpr range< accessor::bitwise_not< Accessor > > operator~ (const range< Accessor > &operand)
 
template<typename Accessor >
constexpr range< accessor::zero_operation< Accessor > > zero (const range< Accessor > &operand)
 
template<typename Accessor >
constexpr range< accessor::one_operaton< Accessor > > one (const range< Accessor > &operand)
 
template<typename Accessor >
constexpr range< accessor::abs_operaton< Accessor > > abs (const range< Accessor > &operand)
 
template<typename Accessor >
constexpr range< accessor::real_operaton< Accessor > > real (const range< Accessor > &operand)
 
template<typename Accessor >
constexpr range< accessor::imag_operaton< Accessor > > imag (const range< Accessor > &operand)
 
template<typename Accessor >
constexpr range< accessor::conj_operaton< Accessor > > conj (const range< Accessor > &operand)
 
template<typename Accessor >
constexpr range< accessor::squared_norm_operaton< Accessor > > squared_norm (const range< Accessor > &operand)
 
template<typename Accessor >
constexpr range< accessor::transpose_operation< Accessor > > transpose (const range< Accessor > &operand)
 
template<typename Accessor >
constexpr range< accessor::add< ::gko::detail::operation_kind::range_by_range, Accessor, Accessor > > operator+ (const range< Accessor > &first, const range< Accessor > &second)
 
template<typename FirstAccessor , typename SecondAccessor >
constexpr range< accessor::add< ::gko::detail::operation_kind::range_by_range, FirstAccessor, SecondAccessor > > operator+ (const range< FirstAccessor > &first, const range< SecondAccessor > &second)
 
template<typename FirstAccessor , typename SecondOperand >
constexpr range< accessor::add< ::gko::detail::operation_kind::range_by_scalar, FirstAccessor, SecondOperand > > operator+ (const range< FirstAccessor > &first, const SecondOperand &second)
 
template<typename FirstOperand , typename SecondAccessor >
constexpr range< accessor::add< ::gko::detail::operation_kind::scalar_by_range, FirstOperand, SecondAccessor > > operator+ (const FirstOperand &first, const range< SecondAccessor > &second)
 
template<typename Accessor >
constexpr range< accessor::sub< ::gko::detail::operation_kind::range_by_range, Accessor, Accessor > > operator- (const range< Accessor > &first, const range< Accessor > &second)
 
template<typename FirstAccessor , typename SecondAccessor >
constexpr range< accessor::sub< ::gko::detail::operation_kind::range_by_range, FirstAccessor, SecondAccessor > > operator- (const range< FirstAccessor > &first, const range< SecondAccessor > &second)
 
template<typename FirstAccessor , typename SecondOperand >
constexpr range< accessor::sub< ::gko::detail::operation_kind::range_by_scalar, FirstAccessor, SecondOperand > > operator- (const range< FirstAccessor > &first, const SecondOperand &second)
 
template<typename FirstOperand , typename SecondAccessor >
constexpr range< accessor::sub< ::gko::detail::operation_kind::scalar_by_range, FirstOperand, SecondAccessor > > operator- (const FirstOperand &first, const range< SecondAccessor > &second)
 
template<typename Accessor >
constexpr range< accessor::mul< ::gko::detail::operation_kind::range_by_range, Accessor, Accessor > > operator* (const range< Accessor > &first, const range< Accessor > &second)
 
template<typename FirstAccessor , typename SecondAccessor >
constexpr range< accessor::mul< ::gko::detail::operation_kind::range_by_range, FirstAccessor, SecondAccessor > > operator* (const range< FirstAccessor > &first, const range< SecondAccessor > &second)
 
template<typename FirstAccessor , typename SecondOperand >
constexpr range< accessor::mul< ::gko::detail::operation_kind::range_by_scalar, FirstAccessor, SecondOperand > > operator* (const range< FirstAccessor > &first, const SecondOperand &second)
 
template<typename FirstOperand , typename SecondAccessor >
constexpr range< accessor::mul< ::gko::detail::operation_kind::scalar_by_range, FirstOperand, SecondAccessor > > operator* (const FirstOperand &first, const range< SecondAccessor > &second)
 
template<typename Accessor >
constexpr range< accessor::div< ::gko::detail::operation_kind::range_by_range, Accessor, Accessor > > operator/ (const range< Accessor > &first, const range< Accessor > &second)
 
template<typename FirstAccessor , typename SecondAccessor >
constexpr range< accessor::div< ::gko::detail::operation_kind::range_by_range, FirstAccessor, SecondAccessor > > operator/ (const range< FirstAccessor > &first, const range< SecondAccessor > &second)
 
template<typename FirstAccessor , typename SecondOperand >
constexpr range< accessor::div< ::gko::detail::operation_kind::range_by_scalar, FirstAccessor, SecondOperand > > operator/ (const range< FirstAccessor > &first, const SecondOperand &second)
 
template<typename FirstOperand , typename SecondAccessor >
constexpr range< accessor::div< ::gko::detail::operation_kind::scalar_by_range, FirstOperand, SecondAccessor > > operator/ (const FirstOperand &first, const range< SecondAccessor > &second)
 
template<typename Accessor >
constexpr range< accessor::mod< ::gko::detail::operation_kind::range_by_range, Accessor, Accessor > > operator% (const range< Accessor > &first, const range< Accessor > &second)
 
template<typename FirstAccessor , typename SecondAccessor >
constexpr range< accessor::mod< ::gko::detail::operation_kind::range_by_range, FirstAccessor, SecondAccessor > > operator% (const range< FirstAccessor > &first, const range< SecondAccessor > &second)
 
template<typename FirstAccessor , typename SecondOperand >
constexpr range< accessor::mod< ::gko::detail::operation_kind::range_by_scalar, FirstAccessor, SecondOperand > > operator% (const range< FirstAccessor > &first, const SecondOperand &second)
 
template<typename FirstOperand , typename SecondAccessor >
constexpr range< accessor::mod< ::gko::detail::operation_kind::scalar_by_range, FirstOperand, SecondAccessor > > operator% (const FirstOperand &first, const range< SecondAccessor > &second)
 
template<typename Accessor >
constexpr range< accessor::less< ::gko::detail::operation_kind::range_by_range, Accessor, Accessor > > operator< (const range< Accessor > &first, const range< Accessor > &second)
 
template<typename FirstAccessor , typename SecondAccessor >
constexpr range< accessor::less< ::gko::detail::operation_kind::range_by_range, FirstAccessor, SecondAccessor > > operator< (const range< FirstAccessor > &first, const range< SecondAccessor > &second)
 
template<typename FirstAccessor , typename SecondOperand >
constexpr range< accessor::less< ::gko::detail::operation_kind::range_by_scalar, FirstAccessor, SecondOperand > > operator< (const range< FirstAccessor > &first, const SecondOperand &second)
 
template<typename FirstOperand , typename SecondAccessor >
constexpr range< accessor::less< ::gko::detail::operation_kind::scalar_by_range, FirstOperand, SecondAccessor > > operator< (const FirstOperand &first, const range< SecondAccessor > &second)
 
template<typename Accessor >
constexpr range< accessor::greater< ::gko::detail::operation_kind::range_by_range, Accessor, Accessor > > operator> (const range< Accessor > &first, const range< Accessor > &second)
 
template<typename FirstAccessor , typename SecondAccessor >
constexpr range< accessor::greater< ::gko::detail::operation_kind::range_by_range, FirstAccessor, SecondAccessor > > operator> (const range< FirstAccessor > &first, const range< SecondAccessor > &second)
 
template<typename FirstAccessor , typename SecondOperand >
constexpr range< accessor::greater< ::gko::detail::operation_kind::range_by_scalar, FirstAccessor, SecondOperand > > operator> (const range< FirstAccessor > &first, const SecondOperand &second)
 
template<typename FirstOperand , typename SecondAccessor >
constexpr range< accessor::greater< ::gko::detail::operation_kind::scalar_by_range, FirstOperand, SecondAccessor > > operator> (const FirstOperand &first, const range< SecondAccessor > &second)
 
template<typename Accessor >
constexpr range< accessor::less_or_equal< ::gko::detail::operation_kind::range_by_range, Accessor, Accessor > > operator<= (const range< Accessor > &first, const range< Accessor > &second)
 
template<typename FirstAccessor , typename SecondAccessor >
constexpr range< accessor::less_or_equal< ::gko::detail::operation_kind::range_by_range, FirstAccessor, SecondAccessor > > operator<= (const range< FirstAccessor > &first, const range< SecondAccessor > &second)
 
template<typename FirstAccessor , typename SecondOperand >
constexpr range< accessor::less_or_equal< ::gko::detail::operation_kind::range_by_scalar, FirstAccessor, SecondOperand > > operator<= (const range< FirstAccessor > &first, const SecondOperand &second)
 
template<typename FirstOperand , typename SecondAccessor >
constexpr range< accessor::less_or_equal< ::gko::detail::operation_kind::scalar_by_range, FirstOperand, SecondAccessor > > operator<= (const FirstOperand &first, const range< SecondAccessor > &second)
 
template<typename Accessor >
constexpr range< accessor::greater_or_equal< ::gko::detail::operation_kind::range_by_range, Accessor, Accessor > > operator>= (const range< Accessor > &first, const range< Accessor > &second)
 
template<typename FirstAccessor , typename SecondAccessor >
constexpr range< accessor::greater_or_equal< ::gko::detail::operation_kind::range_by_range, FirstAccessor, SecondAccessor > > operator>= (const range< FirstAccessor > &first, const range< SecondAccessor > &second)
 
template<typename FirstAccessor , typename SecondOperand >
constexpr range< accessor::greater_or_equal< ::gko::detail::operation_kind::range_by_scalar, FirstAccessor, SecondOperand > > operator>= (const range< FirstAccessor > &first, const SecondOperand &second)
 
template<typename FirstOperand , typename SecondAccessor >
constexpr range< accessor::greater_or_equal< ::gko::detail::operation_kind::scalar_by_range, FirstOperand, SecondAccessor > > operator>= (const FirstOperand &first, const range< SecondAccessor > &second)
 
template<typename Accessor >
constexpr range< accessor::equal< ::gko::detail::operation_kind::range_by_range, Accessor, Accessor > > operator== (const range< Accessor > &first, const range< Accessor > &second)
 
template<typename FirstAccessor , typename SecondAccessor >
constexpr range< accessor::equal< ::gko::detail::operation_kind::range_by_range, FirstAccessor, SecondAccessor > > operator== (const range< FirstAccessor > &first, const range< SecondAccessor > &second)
 
template<typename FirstAccessor , typename SecondOperand >
constexpr range< accessor::equal< ::gko::detail::operation_kind::range_by_scalar, FirstAccessor, SecondOperand > > operator== (const range< FirstAccessor > &first, const SecondOperand &second)
 
template<typename FirstOperand , typename SecondAccessor >
constexpr range< accessor::equal< ::gko::detail::operation_kind::scalar_by_range, FirstOperand, SecondAccessor > > operator== (const FirstOperand &first, const range< SecondAccessor > &second)
 
template<typename Accessor >
constexpr range< accessor::not_equal< ::gko::detail::operation_kind::range_by_range, Accessor, Accessor > > operator!= (const range< Accessor > &first, const range< Accessor > &second)
 
template<typename FirstAccessor , typename SecondAccessor >
constexpr range< accessor::not_equal< ::gko::detail::operation_kind::range_by_range, FirstAccessor, SecondAccessor > > operator!= (const range< FirstAccessor > &first, const range< SecondAccessor > &second)
 
template<typename FirstAccessor , typename SecondOperand >
constexpr range< accessor::not_equal< ::gko::detail::operation_kind::range_by_scalar, FirstAccessor, SecondOperand > > operator!= (const range< FirstAccessor > &first, const SecondOperand &second)
 
template<typename FirstOperand , typename SecondAccessor >
constexpr range< accessor::not_equal< ::gko::detail::operation_kind::scalar_by_range, FirstOperand, SecondAccessor > > operator!= (const FirstOperand &first, const range< SecondAccessor > &second)
 
template<typename Accessor >
constexpr range< accessor::logical_or< ::gko::detail::operation_kind::range_by_range, Accessor, Accessor > > operator|| (const range< Accessor > &first, const range< Accessor > &second)
 
template<typename FirstAccessor , typename SecondAccessor >
constexpr range< accessor::logical_or< ::gko::detail::operation_kind::range_by_range, FirstAccessor, SecondAccessor > > operator|| (const range< FirstAccessor > &first, const range< SecondAccessor > &second)
 
template<typename FirstAccessor , typename SecondOperand >
constexpr range< accessor::logical_or< ::gko::detail::operation_kind::range_by_scalar, FirstAccessor, SecondOperand > > operator|| (const range< FirstAccessor > &first, const SecondOperand &second)
 
template<typename FirstOperand , typename SecondAccessor >
constexpr range< accessor::logical_or< ::gko::detail::operation_kind::scalar_by_range, FirstOperand, SecondAccessor > > operator|| (const FirstOperand &first, const range< SecondAccessor > &second)
 
template<typename Accessor >
constexpr range< accessor::logical_and< ::gko::detail::operation_kind::range_by_range, Accessor, Accessor > > operator&& (const range< Accessor > &first, const range< Accessor > &second)
 
template<typename FirstAccessor , typename SecondAccessor >
constexpr range< accessor::logical_and< ::gko::detail::operation_kind::range_by_range, FirstAccessor, SecondAccessor > > operator&& (const range< FirstAccessor > &first, const range< SecondAccessor > &second)
 
template<typename FirstAccessor , typename SecondOperand >
constexpr range< accessor::logical_and< ::gko::detail::operation_kind::range_by_scalar, FirstAccessor, SecondOperand > > operator&& (const range< FirstAccessor > &first, const SecondOperand &second)
 
template<typename FirstOperand , typename SecondAccessor >
constexpr range< accessor::logical_and< ::gko::detail::operation_kind::scalar_by_range, FirstOperand, SecondAccessor > > operator&& (const FirstOperand &first, const range< SecondAccessor > &second)
 
template<typename Accessor >
constexpr range< accessor::bitwise_or< ::gko::detail::operation_kind::range_by_range, Accessor, Accessor > > operator| (const range< Accessor > &first, const range< Accessor > &second)
 
template<typename FirstAccessor , typename SecondAccessor >
constexpr range< accessor::bitwise_or< ::gko::detail::operation_kind::range_by_range, FirstAccessor, SecondAccessor > > operator| (const range< FirstAccessor > &first, const range< SecondAccessor > &second)
 
template<typename FirstAccessor , typename SecondOperand >
constexpr range< accessor::bitwise_or< ::gko::detail::operation_kind::range_by_scalar, FirstAccessor, SecondOperand > > operator| (const range< FirstAccessor > &first, const SecondOperand &second)
 
template<typename FirstOperand , typename SecondAccessor >
constexpr range< accessor::bitwise_or< ::gko::detail::operation_kind::scalar_by_range, FirstOperand, SecondAccessor > > operator| (const FirstOperand &first, const range< SecondAccessor > &second)
 
template<typename Accessor >
constexpr range< accessor::bitwise_and< ::gko::detail::operation_kind::range_by_range, Accessor, Accessor > > operator& (const range< Accessor > &first, const range< Accessor > &second)
 
template<typename FirstAccessor , typename SecondAccessor >
constexpr range< accessor::bitwise_and< ::gko::detail::operation_kind::range_by_range, FirstAccessor, SecondAccessor > > operator& (const range< FirstAccessor > &first, const range< SecondAccessor > &second)
 
template<typename FirstAccessor , typename SecondOperand >
constexpr range< accessor::bitwise_and< ::gko::detail::operation_kind::range_by_scalar, FirstAccessor, SecondOperand > > operator& (const range< FirstAccessor > &first, const SecondOperand &second)
 
template<typename FirstOperand , typename SecondAccessor >
constexpr range< accessor::bitwise_and< ::gko::detail::operation_kind::scalar_by_range, FirstOperand, SecondAccessor > > operator& (const FirstOperand &first, const range< SecondAccessor > &second)
 
template<typename Accessor >
constexpr range< accessor::bitwise_xor< ::gko::detail::operation_kind::range_by_range, Accessor, Accessor > > operator^ (const range< Accessor > &first, const range< Accessor > &second)
 
template<typename FirstAccessor , typename SecondAccessor >
constexpr range< accessor::bitwise_xor< ::gko::detail::operation_kind::range_by_range, FirstAccessor, SecondAccessor > > operator^ (const range< FirstAccessor > &first, const range< SecondAccessor > &second)
 
template<typename FirstAccessor , typename SecondOperand >
constexpr range< accessor::bitwise_xor< ::gko::detail::operation_kind::range_by_scalar, FirstAccessor, SecondOperand > > operator^ (const range< FirstAccessor > &first, const SecondOperand &second)
 
template<typename FirstOperand , typename SecondAccessor >
constexpr range< accessor::bitwise_xor< ::gko::detail::operation_kind::scalar_by_range, FirstOperand, SecondAccessor > > operator^ (const FirstOperand &first, const range< SecondAccessor > &second)
 
template<typename Accessor >
constexpr range< accessor::left_shift< ::gko::detail::operation_kind::range_by_range, Accessor, Accessor > > operator<< (const range< Accessor > &first, const range< Accessor > &second)
 
template<typename FirstAccessor , typename SecondAccessor >
constexpr range< accessor::left_shift< ::gko::detail::operation_kind::range_by_range, FirstAccessor, SecondAccessor > > operator<< (const range< FirstAccessor > &first, const range< SecondAccessor > &second)
 
template<typename FirstAccessor , typename SecondOperand >
constexpr range< accessor::left_shift< ::gko::detail::operation_kind::range_by_scalar, FirstAccessor, SecondOperand > > operator<< (const range< FirstAccessor > &first, const SecondOperand &second)
 
template<typename FirstOperand , typename SecondAccessor >
constexpr range< accessor::left_shift< ::gko::detail::operation_kind::scalar_by_range, FirstOperand, SecondAccessor > > operator<< (const FirstOperand &first, const range< SecondAccessor > &second)
 
template<typename Accessor >
constexpr range< accessor::right_shift< ::gko::detail::operation_kind::range_by_range, Accessor, Accessor > > operator>> (const range< Accessor > &first, const range< Accessor > &second)
 
template<typename FirstAccessor , typename SecondAccessor >
constexpr range< accessor::right_shift< ::gko::detail::operation_kind::range_by_range, FirstAccessor, SecondAccessor > > operator>> (const range< FirstAccessor > &first, const range< SecondAccessor > &second)
 
template<typename FirstAccessor , typename SecondOperand >
constexpr range< accessor::right_shift< ::gko::detail::operation_kind::range_by_scalar, FirstAccessor, SecondOperand > > operator>> (const range< FirstAccessor > &first, const SecondOperand &second)
 
template<typename FirstOperand , typename SecondAccessor >
constexpr range< accessor::right_shift< ::gko::detail::operation_kind::scalar_by_range, FirstOperand, SecondAccessor > > operator>> (const FirstOperand &first, const range< SecondAccessor > &second)
 
template<typename Accessor >
constexpr range< accessor::max_operaton< ::gko::detail::operation_kind::range_by_range, Accessor, Accessor > > max (const range< Accessor > &first, const range< Accessor > &second)
 
template<typename FirstAccessor , typename SecondAccessor >
constexpr range< accessor::max_operaton< ::gko::detail::operation_kind::range_by_range, FirstAccessor, SecondAccessor > > max (const range< FirstAccessor > &first, const range< SecondAccessor > &second)
 
template<typename FirstAccessor , typename SecondOperand >
constexpr range< accessor::max_operaton< ::gko::detail::operation_kind::range_by_scalar, FirstAccessor, SecondOperand > > max (const range< FirstAccessor > &first, const SecondOperand &second)
 
template<typename FirstOperand , typename SecondAccessor >
constexpr range< accessor::max_operaton< ::gko::detail::operation_kind::scalar_by_range, FirstOperand, SecondAccessor > > max (const FirstOperand &first, const range< SecondAccessor > &second)
 
template<typename Accessor >
constexpr range< accessor::min_operaton< ::gko::detail::operation_kind::range_by_range, Accessor, Accessor > > min (const range< Accessor > &first, const range< Accessor > &second)
 
template<typename FirstAccessor , typename SecondAccessor >
constexpr range< accessor::min_operaton< ::gko::detail::operation_kind::range_by_range, FirstAccessor, SecondAccessor > > min (const range< FirstAccessor > &first, const range< SecondAccessor > &second)
 
template<typename FirstAccessor , typename SecondOperand >
constexpr range< accessor::min_operaton< ::gko::detail::operation_kind::range_by_scalar, FirstAccessor, SecondOperand > > min (const range< FirstAccessor > &first, const SecondOperand &second)
 
template<typename FirstOperand , typename SecondAccessor >
constexpr range< accessor::min_operaton< ::gko::detail::operation_kind::scalar_by_range, FirstOperand, SecondAccessor > > min (const FirstOperand &first, const range< SecondAccessor > &second)
 
template<typename Accessor >
constexpr range< accessor::mmul_operation< ::gko::detail::operation_kind::range_by_range, Accessor, Accessor > > mmul (const range< Accessor > &first, const range< Accessor > &second)
 
template<typename FirstAccessor , typename SecondAccessor >
constexpr range< accessor::mmul_operation< ::gko::detail::operation_kind::range_by_range, FirstAccessor, SecondAccessor > > mmul (const range< FirstAccessor > &first, const range< SecondAccessor > &second)
 
template<typename FirstAccessor , typename SecondOperand >
constexpr range< accessor::mmul_operation< ::gko::detail::operation_kind::range_by_scalar, FirstAccessor, SecondOperand > > mmul (const range< FirstAccessor > &first, const SecondOperand &second)
 
template<typename FirstOperand , typename SecondAccessor >
constexpr range< accessor::mmul_operation< ::gko::detail::operation_kind::scalar_by_range, FirstOperand, SecondAccessor > > mmul (const FirstOperand &first, const range< SecondAccessor > &second)
 
constexpr bool operator== (precision_reduction x, precision_reduction y) noexcept
 Checks if two precision_reduction encodings are equal. More...
 
constexpr bool operator!= (precision_reduction x, precision_reduction y) noexcept
 Checks if two precision_reduction encodings are different. More...
 
template<typename Pointer >
detail::cloned_type< Pointer > clone (const Pointer &p)
 Creates a unique clone of the object pointed to by p. More...
 
template<typename Pointer >
detail::cloned_type< Pointer > clone (std::shared_ptr< const Executor > exec, const Pointer &p)
 Creates a unique clone of the object pointed to by p on Executor exec. More...
 
template<typename OwningPointer >
detail::shared_type< OwningPointer > share (OwningPointer &&p)
 Marks the object pointed to by p as shared. More...
 
template<typename OwningPointer >
std::remove_reference< OwningPointer >::type && give (OwningPointer &&p)
 Marks that the object pointed to by p can be given to the callee. More...
 
template<typename Pointer >
std::enable_if< detail::have_ownership_s< Pointer >::value, detail::pointee< Pointer > * >::type lend (const Pointer &p)
 Returns a non-owning (plain) pointer to the object pointed to by p. More...
 
template<typename Pointer >
std::enable_if<!detail::have_ownership_s< Pointer >::value, detail::pointee< Pointer > * >::type lend (const Pointer &p)
 Returns a non-owning (plain) pointer to the object pointed to by p. More...
 
template<typename T , typename U >
std::decay< T >::type * as (U *obj)
 Performs polymorphic type conversion. More...
 
template<typename T , typename U >
const std::decay< T >::type * as (const U *obj)
 Performs polymorphic type conversion. More...
 
template<typename T , typename U >
std::unique_ptr< typename std::decay< T >::type > as (std::unique_ptr< U > &&obj)
 Performs polymorphic type conversion of a unique_ptr. More...
 
template<typename T , typename U >
std::shared_ptr< typename std::decay< T >::type > as (std::shared_ptr< U > obj)
 Performs polymorphic type conversion of a shared_ptr. More...
 
template<typename T , typename U >
std::shared_ptr< const typename std::decay< T >::type > as (std::shared_ptr< const U > obj)
 Performs polymorphic type conversion of a shared_ptr. More...
 
template<typename T >
temporary_clone< T > make_temporary_clone (std::shared_ptr< const Executor > exec, T *ptr)
 Creates a temporary_clone. More...
 
bool operator== (const version &first, const version &second)
 
bool operator!= (const version &first, const version &second)
 
bool operator< (const version &first, const version &second)
 
bool operator<= (const version &first, const version &second)
 
bool operator> (const version &first, const version &second)
 
bool operator>= (const version &first, const version &second)
 
std::ostream & operator<< (std::ostream &os, const version &ver)
 Prints version information to a stream. More...
 
std::ostream & operator<< (std::ostream &os, const version_info &ver_info)
 Prints library version information in human-readable format to a stream. More...
 
template<typename Matrix , typename... TArgs>
std::unique_ptr< Matrix > initialize (size_type stride, std::initializer_list< typename Matrix::value_type > vals, std::shared_ptr< const Executor > exec, TArgs &&... create_args)
 Creates and initializes a column-vector. More...
 
template<typename Matrix , typename... TArgs>
std::unique_ptr< Matrix > initialize (std::initializer_list< typename Matrix::value_type > vals, std::shared_ptr< const Executor > exec, TArgs &&... create_args)
 Creates and initializes a column-vector. More...
 
template<typename Matrix , typename... TArgs>
std::unique_ptr< Matrix > initialize (size_type stride, std::initializer_list< std::initializer_list< typename Matrix::value_type >> vals, std::shared_ptr< const Executor > exec, TArgs &&... create_args)
 Creates and initializes a matrix. More...
 
template<typename Matrix , typename... TArgs>
std::unique_ptr< Matrix > initialize (std::initializer_list< std::initializer_list< typename Matrix::value_type >> vals, std::shared_ptr< const Executor > exec, TArgs &&... create_args)
 Creates and initializes a matrix. More...
 
bool operator== (const stopping_status &x, const stopping_status &y) noexcept
 Checks if two stopping statuses are equivalent. More...
 
bool operator!= (const stopping_status &x, const stopping_status &y) noexcept
 Checks if two stopping statuses are different. More...
 

Variables

constexpr size_type byte_size = CHAR_BIT
 Number of bits in a byte.
 

Detailed Description

The Ginkgo namespace.

Typedef Documentation

◆ is_complex_s

template<typename T >
using gko::is_complex_s = typedef detail::is_complex_impl<T>

Allows to check if T is a complex value during compile time by accessing the value attribute of this struct.

If value is true, T is a complex type, if it is false, T is not a complex type.

Template Parameters
Ttype to check

Enumeration Type Documentation

◆ layout_type

enum gko::layout_type
strong

Specifies the layout type when writing data in matrix market format.

Enumerator
array 

The matrix should be written as dense matrix in column-major order.

coordinate 

The matrix should be written as a sparse matrix in coordinate format.

Function Documentation

◆ abs()

template<typename T >
constexpr T gko::abs ( const T &  x)
inlineconstexpr

Returns the absolute value of the object.

Template Parameters
Tthe type of the object
Parameters
xthe object
Returns
x >= zero<T>() ? x : -x;

Referenced by is_finite().

◆ as() [1/5]

template<typename T , typename U >
const std::decay<T>::type* gko::as ( const U *  obj)
inline

Performs polymorphic type conversion.

This is the constant version of the function.

Template Parameters
Trequested result type
Ustatic type of the passed object
Parameters
objthe object which should be converted
Returns
If successful, returns a pointer to the subtype, otherwise throws NotSupported.

◆ as() [2/5]

template<typename T , typename U >
std::shared_ptr<const typename std::decay<T>::type> gko::as ( std::shared_ptr< const U >  obj)
inline

Performs polymorphic type conversion of a shared_ptr.

This is the constant version of the function.

Template Parameters
Trequested result type
Ustatic type of the passed object
Parameters
objthe shared_ptr to the object which should be converted.
Returns
If successful, returns a shared_ptr to the subtype, otherwise throws NotSupported. This pointer shares ownership with the input pointer.

◆ as() [3/5]

template<typename T , typename U >
std::shared_ptr<typename std::decay<T>::type> gko::as ( std::shared_ptr< U >  obj)
inline

Performs polymorphic type conversion of a shared_ptr.

Template Parameters
Trequested result type
Ustatic type of the passed object
Parameters
objthe shared_ptr to the object which should be converted.
Returns
If successful, returns a shared_ptr to the subtype, otherwise throws NotSupported. This pointer shares ownership with the input pointer.

◆ as() [4/5]

template<typename T , typename U >
std::unique_ptr<typename std::decay<T>::type> gko::as ( std::unique_ptr< U > &&  obj)
inline

Performs polymorphic type conversion of a unique_ptr.

Template Parameters
Trequested result type
Ustatic type of the passed object
Parameters
objthe unique_ptr to the object which should be converted. If successful, it will be reset to a nullptr.
Returns
If successful, returns a unique_ptr to the subtype, otherwise throws NotSupported.

◆ as() [5/5]

template<typename T , typename U >
std::decay<T>::type* gko::as ( U *  obj)
inline

Performs polymorphic type conversion.

Template Parameters
Trequested result type
Ustatic type of the passed object
Parameters
objthe object which should be converted
Returns
If successful, returns a pointer to the subtype, otherwise throws NotSupported.

◆ ceildiv()

constexpr int64 gko::ceildiv ( int64  num,
int64  den 
)
inlineconstexpr

◆ clone() [1/2]

template<typename Pointer >
detail::cloned_type<Pointer> gko::clone ( const Pointer &  p)
inline

Creates a unique clone of the object pointed to by p.

The pointee (i.e. *p) needs to have a clone method that returns a std::unique_ptr in order for this method to work.

Template Parameters
Pointertype of pointer to the object (plain or smart pointer)
Parameters
pa pointer to the object
Note
The difference between this function and directly calling LinOp::clone() is that this one preserves the static type of the object.

Referenced by gko::temporary_clone< T >::temporary_clone().

◆ clone() [2/2]

template<typename Pointer >
detail::cloned_type<Pointer> gko::clone ( std::shared_ptr< const Executor exec,
const Pointer &  p 
)
inline

Creates a unique clone of the object pointed to by p on Executor exec.

The pointee (i.e. *p) needs to have a clone method that takes an executor and returns a std::unique_ptr in order for this method to work.

Template Parameters
Pointertype of pointer to the object (plain or smart pointer)
Parameters
execthe executor where the cloned object should be stored
pa pointer to the object
Note
The difference between this function and directly calling LinOp::clone() is that this one preserves the static type of the object.

◆ conj()

template<typename T >
xstd::enable_if_t<!is_complex_s<T>::value, T> gko::conj ( const T &  x)
inline

Returns the conjugate of an object.

Parameters
xthe number to conjugate
Returns
conjugate of the object (by default, the object itself)

Referenced by squared_norm().

◆ copy_and_convert_to() [1/4]

template<typename R , typename T >
std::unique_ptr<const R, std::function<void(const R *)> > gko::copy_and_convert_to ( std::shared_ptr< const Executor exec,
const T *  obj 
)

Converts the object to R and places it on Executor exec.

If the object is already of the requested type and on the requested executor, the copy and conversion is avoided and a reference to the original object is returned instead.

Template Parameters
Rthe type to which the object should be converted
Tthe type of the input object
Parameters
execthe executor where the result should be placed
objthe object that should be converted
Returns
a unique pointer (with dynamically bound deleter) to the converted object
Note
This is a version of the function which adds the const qualifier to the result if the input had the same qualifier.

◆ copy_and_convert_to() [2/4]

template<typename R , typename T >
std::shared_ptr<const R> gko::copy_and_convert_to ( std::shared_ptr< const Executor exec,
std::shared_ptr< const T >  obj 
)

This is the version that takes in the std::shared_ptr and returns a std::shared_ptr

If the object is already of the requested type and on the requested executor, the copy and conversion is avoided and a reference to the original object is returned instead.

Template Parameters
Rthe type to which the object should be converted
Tthe type of the input object
Parameters
execthe executor where the result should be placed
objthe object that should be converted
Returns
a shared pointer to the converted object
Note
This is a version of the function which adds the const qualifier to the result if the input had the same qualifier.

◆ copy_and_convert_to() [3/4]

template<typename R , typename T >
std::shared_ptr<R> gko::copy_and_convert_to ( std::shared_ptr< const Executor exec,
std::shared_ptr< T >  obj 
)

Converts the object to R and places it on Executor exec.

This is the version that takes in the std::shared_ptr and returns a std::shared_ptr

If the object is already of the requested type and on the requested executor, the copy and conversion is avoided and a reference to the original object is returned instead.

Template Parameters
Rthe type to which the object should be converted
Tthe type of the input object
Parameters
execthe executor where the result should be placed
objthe object that should be converted
Returns
a shared pointer to the converted object

◆ copy_and_convert_to() [4/4]

template<typename R , typename T >
std::unique_ptr<R, std::function<void(R *)> > gko::copy_and_convert_to ( std::shared_ptr< const Executor exec,
T *  obj 
)

Converts the object to R and places it on Executor exec.

If the object is already of the requested type and on the requested executor, the copy and conversion is avoided and a reference to the original object is returned instead.

Template Parameters
Rthe type to which the object should be converted
Tthe type of the input object
Parameters
execthe executor where the result should be placed
objthe object that should be converted
Returns
a unique pointer (with dynamically bound deleter) to the converted object

◆ get_significant_bit()

template<typename T >
constexpr uint32 gko::get_significant_bit ( const T &  n,
uint32  hint = 0u 
)
constexprnoexcept

Returns the position of the most significant bit of the number.

This is the same as the rounded down base-2 logarithm of the number.

Template Parameters
Ta numeric type supporting bit shift and comparison
Parameters
na number
hinta lower bound for the position o the significant bit
Returns
maximum of hint and the significant bit position of n

◆ get_superior_power()

template<typename T >
constexpr T gko::get_superior_power ( const T &  base,
const T &  limit,
const T &  hint = T{1} 
)
constexprnoexcept

Returns the smallest power of base not smaller than limit.

Template Parameters
Ta numeric type supporting multiplication and comparison
Parameters
basethe base of the power to be returned
limitthe lower limit on the size of the power returned
hinta lower bound on the result, has to be a power of base
Returns
the smallest power of base not smaller than limit

◆ give()

template<typename OwningPointer >
std::remove_reference<OwningPointer>::type&& gko::give ( OwningPointer &&  p)
inline

Marks that the object pointed to by p can be given to the callee.

Effectively calls std::move(p).

Template Parameters
OwningPointertype of pointer with ownership to the object (has to be a smart pointer)
Parameters
pa pointer to the object
Note
The original pointer p becomes invalid after this call.

◆ imag()

template<typename T >
constexpr xstd::enable_if_t<!is_complex_s<T>::value, T> gko::imag ( const T &  )
inlineconstexpr

Returns the imaginary part of the object.

Template Parameters
Ttype of the object
Parameters
xthe object
Returns
imaginary part of the object (by default, zero<T>())

◆ is_complex()

template<typename T >
constexpr bool gko::is_complex ( )
inlineconstexpr

Checks if T is a complex type.

Template Parameters
Ttype to check
Returns
true if T is a complex type, false otherwise

◆ is_finite() [1/2]

template<typename T >
xstd::enable_if_t<!is_complex_s<T>::value, bool> gko::is_finite ( const T &  value)
inline

Checks if a floating point number is finite, meaning it is neither +/- infinity nor NaN.

Template Parameters
Ttype of the value to check
Parameters
valuevalue to check
Returns
true if the value is finite, meaning it are neither +/- infinity nor NaN.

References abs().

Referenced by is_finite().

◆ is_finite() [2/2]

template<typename T >
xstd::enable_if_t<is_complex_s<T>::value, bool> gko::is_finite ( const T &  value)
inline

Checks if all components of a complex value are finite, meaning they are neither +/- infinity nor NaN.

Template Parameters
Tcomplex type of the value to check
Parameters
valuecomplex value to check
Returns
true if both components of the given value are finite, meaning they are neither +/- infinity nor NaN.

References is_finite().

◆ lend() [1/2]

template<typename Pointer >
std::enable_if<detail::have_ownership_s<Pointer>::value, detail::pointee<Pointer> *>::type gko::lend ( const Pointer &  p)
inline

Returns a non-owning (plain) pointer to the object pointed to by p.

Template Parameters
Pointertype of pointer to the object (plain or smart pointer)
Parameters
pa pointer to the object
Note
This is the overload for owning (smart) pointers, that behaves the same as calling .get() on the smart pointer.

Referenced by gko::log::EnableLogging< Executor >::remove_logger().

◆ lend() [2/2]

template<typename Pointer >
std::enable_if<!detail::have_ownership_s<Pointer>::value, detail::pointee<Pointer> *>::type gko::lend ( const Pointer &  p)
inline

Returns a non-owning (plain) pointer to the object pointed to by p.

Template Parameters
Pointertype of pointer to the object (plain or smart pointer)
Parameters
pa pointer to the object
Note
This is the overload for non-owning (plain) pointers, that just returns p.

◆ make_temporary_clone()

template<typename T >
temporary_clone<T> gko::make_temporary_clone ( std::shared_ptr< const Executor exec,
T *  ptr 
)

Creates a temporary_clone.

This is a helper function which avoids the need to explicitly specify the type of the object, as would be the case if using the constructor of temporary_clone.

Parameters
execthe executor where the clone will be created
ptra pointer to the object of which the clone will be created

Referenced by gko::matrix::Dense< ValueType >::add_scaled(), gko::LinOp::apply(), gko::matrix::Coo< ValueType, IndexType >::apply2(), gko::matrix::Dense< ValueType >::compute_dot(), gko::matrix::Dense< ValueType >::compute_norm2(), and gko::matrix::Dense< ValueType >::scale().

◆ max()

template<typename T >
constexpr T gko::max ( const T &  x,
const T &  y 
)
inlineconstexpr

Returns the larger of the arguments.

Template Parameters
Ttype of the arguments
Parameters
xfirst argument
ysecond argument
Returns
x >= y ? x : y
Note
C++11 version of this function is not constexpr, thus we provide our own implementation.

Referenced by gko::matrix::Csr< ValueType, IndexType >::automatical::process().

◆ min()

template<typename T >
constexpr T gko::min ( const T &  x,
const T &  y 
)
inlineconstexpr

Returns the smaller of the arguments.

Template Parameters
Ttype of the arguments
Parameters
xfirst argument
ysecond argument
Returns
x <= y ? x : y
Note
C++11 version of this function is not constexpr, thus we provide our own implementation.

Referenced by gko::matrix::Csr< ValueType, IndexType >::load_balance::clac_size().

◆ one() [1/2]

template<typename T >
constexpr T gko::one ( )
inlineconstexpr

Returns the multiplicative identity for T.

Returns
the multiplicative identity for T

◆ one() [2/2]

template<typename T >
constexpr T gko::one ( const T &  )
inlineconstexpr

Returns the multiplicative identity for T.

Returns
the multiplicative identity for T
Note
This version takes an unused reference argument to avoid complicated calls like one<decltype(x)>(). Instead, it allows one(x).

◆ operator!=() [1/3]

template<size_type Dimensionality, typename DimensionType >
constexpr bool gko::operator!= ( const dim< Dimensionality, DimensionType > &  x,
const dim< Dimensionality, DimensionType > &  y 
)
inlineconstexpr

Checks if two dim objects are different.

Template Parameters
Dimensionalitynumber of dimensions of the dim objects
DimensionTypedatatype used to represent each dimension
Parameters
xfirst object
ysecond object
Returns
!(x == y)

◆ operator!=() [2/3]

bool gko::operator!= ( const stopping_status x,
const stopping_status y 
)
inlinenoexcept

Checks if two stopping statuses are different.

Parameters
xa stopping status
ya stopping status
Returns
true if and only if !(x == y)

◆ operator!=() [3/3]

constexpr bool gko::operator!= ( precision_reduction  x,
precision_reduction  y 
)
constexprnoexcept

Checks if two precision_reduction encodings are different.

Parameters
xan encoding
yan encoding
Returns
true if and only if x and y are different encodings.

◆ operator<<() [1/2]

std::ostream& gko::operator<< ( std::ostream &  os,
const version ver 
)
inline

Prints version information to a stream.

Parameters
osoutput stream
verversion structure
Returns
os

References gko::version::major, gko::version::minor, gko::version::patch, and gko::version::tag.

◆ operator<<() [2/2]

std::ostream& gko::operator<< ( std::ostream &  os,
const version_info ver_info 
)

Prints library version information in human-readable format to a stream.

Parameters
osoutput stream
ver_infoversion information
Returns
os

◆ operator==() [1/2]

bool gko::operator== ( const stopping_status x,
const stopping_status y 
)
inlinenoexcept

Checks if two stopping statuses are equivalent.

Parameters
xa stopping status
ya stopping status
Returns
true if and only if both x and y have the same mask and converged and finalized state

◆ operator==() [2/2]

constexpr bool gko::operator== ( precision_reduction  x,
precision_reduction  y 
)
constexprnoexcept

Checks if two precision_reduction encodings are equal.

Parameters
xan encoding
yan encoding
Returns
true if and only if x and y are the same encodings

◆ read()

template<typename MatrixType , typename StreamType , typename... MatrixArgs>
std::unique_ptr<MatrixType> gko::read ( StreamType &&  is,
MatrixArgs &&...  args 
)
inline

Reads a matrix stored in matrix market format from an input stream.

Template Parameters
MatrixTypea ReadableFromMatrixData LinOp type used to store the matrix once it's been read from disk.
StreamTypetype of stream used to write the data to
MatrixArgsadditional argument types passed to MatrixType constructor
Parameters
isinput stream from which to read the data
argsadditional arguments passed to MatrixType constructor
Returns
A MatrixType LinOp filled with data from filename

References read_raw().

◆ read_raw()

template<typename ValueType = default_precision, typename IndexType = int32>
matrix_data<ValueType, IndexType> gko::read_raw ( std::istream &  is)

Reads a matrix stored in matrix market format from an input stream.

Template Parameters
ValueTypetype of matrix values
IndexTypetype of matrix indexes
Parameters
isinput stream from which to read the data
Returns
A matrix_data structure containing the matrix. The nonzero elements are sorted in lexicographic order of their (row, colum) indexes.
Note
This is an advanced routine that will return the raw matrix data structure. Consider using gko::read instead.

Referenced by read().

◆ real()

template<typename T >
constexpr xstd::enable_if_t<!is_complex_s<T>::value, T> gko::real ( const T &  x)
inlineconstexpr

Returns the real part of the object.

Template Parameters
Ttype of the object
Parameters
xthe object
Returns
real part of the object (by default, the object itself)

Referenced by squared_norm().

◆ round_down()

template<typename T >
constexpr reduce_precision<T> gko::round_down ( val)
inlineconstexpr

Reduces the precision of the input parameter.

Template Parameters
Tthe original precision
Parameters
valthe value to round down
Returns
the rounded down value

◆ round_up()

template<typename T >
constexpr increase_precision<T> gko::round_up ( val)
inlineconstexpr

Increases the precision of the input parameter.

Template Parameters
Tthe original precision
Parameters
valthe value to round up
Returns
the rounded up value

◆ share()

template<typename OwningPointer >
detail::shared_type<OwningPointer> gko::share ( OwningPointer &&  p)
inline

Marks the object pointed to by p as shared.

Effectively converts a pointer with ownership to std::shared_ptr.

Template Parameters
OwningPointertype of pointer with ownership to the object (has to be a smart pointer)
Parameters
pa pointer to the object
Note
The original pointer p becomes invalid after this call.

Referenced by gko::preconditioner::Ilu< LSolverType, USolverType, ReverseApply, IndexType >::conj_transpose(), and gko::preconditioner::Ilu< LSolverType, USolverType, ReverseApply, IndexType >::transpose().

◆ squared_norm()

template<typename T >
constexpr auto gko::squared_norm ( const T &  x) -> decltype(real(conj(x) * x))
inlineconstexpr

Returns the squared norm of the object.

Template Parameters
Ttype of the object.
Returns
The squared norm of the object.

References conj(), and real().

◆ transpose()

template<typename DimensionType >
constexpr dim<2, DimensionType> gko::transpose ( const dim< 2, DimensionType > &  dimensions)
inlineconstexprnoexcept

Returns a dim<2> object with its dimensions swapped.

Template Parameters
DimensionTypedatatype used to represent each dimension
Parameters
dimensionsoriginal object
Returns
a dim<2> object with its dimensions swapped

Referenced by gko::preconditioner::Ilu< LSolverType, USolverType, ReverseApply, IndexType >::conj_transpose(), and gko::preconditioner::Ilu< LSolverType, USolverType, ReverseApply, IndexType >::transpose().

◆ write()

template<typename MatrixType , typename StreamType >
void gko::write ( StreamType &&  os,
MatrixType *  matrix,
layout_type  layout = layout_type::array 
)
inline

Reads a matrix stored in matrix market format from an input stream.

Template Parameters
MatrixTypea ReadableFromMatrixData LinOp type used to store the matrix once it's been read from disk.
StreamTypetype of stream used to write the data to
Parameters
osoutput stream where the data is to be written
matrixthe matrix to write
layoutthe layout used in the output

References write_raw().

◆ write_raw()

template<typename ValueType , typename IndexType >
void gko::write_raw ( std::ostream &  os,
const matrix_data< ValueType, IndexType > &  data,
layout_type  layout = layout_type::array 
)

Writes a matrix_data structure to a stream in matrix market format.

Template Parameters
ValueTypetype of matrix values
IndexTypetype of matrix indexes
Parameters
osoutput stream where the data is to be written
datathe matrix data to write
layoutthe layout used in the output
Note
This is an advanced routine that writes the raw matrix data structure. If you are trying to write an existing matrix, consider using gko::write instead.

Referenced by write().

◆ zero() [1/2]

template<typename T >
constexpr T gko::zero ( )
inlineconstexpr

Returns the additive identity for T.

Returns
additive identity for T

◆ zero() [2/2]

template<typename T >
constexpr T gko::zero ( const T &  )
inlineconstexpr

Returns the additive identity for T.

Returns
additive identity for T
Note
This version takes an unused reference argument to avoid complicated calls like zero<decltype(x)>(). Instead, it allows zero(x).