Ginkgo: gko Namespace Reference

| Ginkgo Generated from branch based on main. Ginkgo version 1.11.0 A numerical linear algebra library targeting many-core architectures

Loading...
Searching...
No Matches
gko Namespace Reference

The Ginkgo namespace. More...

## Namespaces
namespace | matrix
| The matrix namespace.
namespace | name_demangling
| The name demangling namespace.
namespace | accessor
| The accessor namespace.
namespace | xstd
| The namespace for functionalities after C++14 standard.
namespace | multigrid
| The multigrid components namespace.
namespace | factorization
| The Factorization namespace.
namespace | log
| The logger namespace .
namespace | stop
| The Stopping criterion namespace.
namespace | preconditioner
| The Preconditioner namespace.
namespace | reorder
| The Reorder namespace.
namespace | solver
| The ginkgo Solve namespace.
namespace | syn
| The Synthesizer namespace.

## Classes
class | AbstractFactory
| The AbstractFactory is a generic interface template that enables easy implementation of the abstract factory design pattern. More...
class | EnableDefaultFactory
| This mixin provides a default implementation of a concrete factory. More...
class | enable_parameters_type
| The enable_parameters_type mixin is used to create a base implementation of the factory parameters structure. More...
class | deferred_factory_parameter
| Represents a factory parameter of factory type that can either initialized by a pre-existing factory or by passing in a factory_parameters object whose .on(exec) will be called to instantiate a factory. More...
class | array
| An array is a container which encapsulates fixed-sized arrays, stored on the Executor tied to the array. More...
struct | batch_dim
| A type representing the dimensions of a multidimensional batch object. More...
class | bfloat16
| A class providing basic support for bfloat16 precision floating point types. More...
class | BlockOperator
| A BlockOperator represents a linear operator that is partitioned into multiple blocks. More...
class | Combination
| The Combination class can be used to construct a linear combination of multiple linear operators c1 * op1 + c2 * op2 + ... + ck * opk. More...
class | Composition
| The Composition class can be used to compose linear operators op1, op2, ..., opn and obtain the operator op1 * op2 * ... * opn. More...
class | UseComposition
| The UseComposition class can be used to store the composition information in LinOp. More...
class | nvidia_device
| nvidia_device handles the number of executor on Nvidia devices and have the corresponding recursive_mutex. More...
class | amd_device
| amd_device handles the number of executor on Amd devices and have the corresponding recursive_mutex. More...
class | device_matrix_data
| This type is a device-side equivalent to matrix_data. More...
struct | dim
| A type representing the dimensions of a multidimensional object. More...
struct | dim< 1u, DimensionType >
class | Error
| The Error class is used to report exceptional behaviour in library functions. More...
class | NotImplemented
| NotImplemented is thrown in case an operation has not yet been implemented (but will be implemented in the future). 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 | NotSupported
| NotSupported is thrown in case it is not possible to perform the requested operation on the given object type. More...
class | MpiError
| MpiError is thrown when a MPI 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 | CublasError
| CublasError is thrown when a cuBLAS routine throws a non-zero error code. More...
class | CurandError
| CurandError is thrown when a cuRAND routine throws a non-zero error code. More...
class | CusparseError
| CusparseError is thrown when a cuSPARSE routine throws a non-zero error code. More...
class | CufftError
| CufftError is thrown when a cuFFT 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 | HipblasError
| HipblasError is thrown when a hipBLAS routine throws a non-zero error code. More...
class | HiprandError
| HiprandError is thrown when a hipRAND routine throws a non-zero error code. More...
class | HipsparseError
| HipsparseError is thrown when a hipSPARSE routine throws a non-zero error code. More...
class | HipfftError
| HipfftError is thrown when a hipFFT routine throws a non-zero error code. More...
class | MetisError
| MetisError is thrown when METIS routine throws an error code. More...
class | DimensionMismatch
| DimensionMismatch is thrown if an operation is being applied to LinOps of incompatible size. More...
class | BadDimension
| BadDimension is thrown if an operation is being applied to a LinOp with bad dimensions. More...
class | BlockSizeError
| Error that denotes issues between block sizes and matrix dimensions. More...
class | ValueMismatch
| ValueMismatch is thrown if two values are not equal. More...
class | AllocationError
| AllocationError is thrown if a memory allocation fails. More...
class | OutOfBoundsError
| OutOfBoundsError is thrown if a memory access is detected to be out-of-bounds. More...
class | OverflowError
| OverflowError is thrown when an index calculation for storage requirements overflows. More...
class | StreamError
| StreamError is thrown if accessing a stream failed. More...
class | KernelNotFound
| KernelNotFound is thrown if Ginkgo cannot find a kernel which satisfies the criteria imposed by the input arguments. More...
class | UnsupportedMatrixProperty
| Exception throws if a matrix does not have a property required by a numerical method. More...
class | InvalidStateError
| Exception thrown if an object is in an invalid state. More...
class | Operation
| Operations can be used to define functionalities whose implementations differ among devices. 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 | OmpExecutor
| This is the Executor subclass which represents the OpenMP device (typically CPU). More...
class | ReferenceExecutor
| This is a specialization of the OmpExecutor, which runs the reference implementations of the kernels used for debugging purposes. More...
class | CudaExecutor
| This is the Executor subclass which represents the CUDA device. More...
class | HipExecutor
| This is the Executor subclass which represents the HIP enhanced device. More...
class | DpcppExecutor
| This is the Executor subclass which represents a DPC++ enhanced device. More...
class | truncated
class | half
| A class providing basic support for half precision floating point types. More...
class | index_set
| An index set class represents an ordered set of intervals. More...
class | LinOp
class | LinOpFactory
| A LinOpFactory represents a higher order mapping which transforms one linear operator into another. More...
class | Transposable
| Linear operators which support transposition should implement the Transposable interface. More...
class | Permutable
| Linear operators which support permutation should implement the Permutable interface. More...
class | ReadableFromMatrixData
| A LinOp implementing this interface can read its data from a matrix_data structure. More...
class | WritableToMatrixData
| A LinOp implementing this interface can write its data to a matrix_data structure. More...
class | Preconditionable
| A LinOp implementing this interface can be preconditioned. More...
class | DiagonalLinOpExtractable
| The diagonal of a LinOp can be extracted. More...
class | DiagonalExtractable
| The diagonal of a LinOp implementing this interface can be extracted. More...
class | AbsoluteComputable
| The AbsoluteComputable is an interface that allows to get the component wise absolute of a LinOp. More...
class | EnableAbsoluteComputation
| The EnableAbsoluteComputation mixin provides the default implementations of compute_absolute_linop and the absolute interface. More...
class | ScaledIdentityAddable
| Adds the operation M <- a I + b M for matrix M, identity operator I and scalars a and b, where M is the calling object. 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 | machine_topology
| The machine topology class represents the hierarchical topology of a machine, including NUMA nodes, cores and PCI Devices. More...
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.
struct | default_converter
| Used to convert objects of type S to objects of type R using static_cast. More...
class | matrix_assembly_data
| This structure is used as an intermediate type to assemble a sparse matrix. More...
struct | matrix_data_entry
| Type used to store nonzeros. More...
struct | matrix_data
| This structure is used as an intermediate data type to store a sparse matrix. More...
class | Allocator
| Provides generic allocation and deallocation functionality to be used by an Executor. More...
class | CpuAllocatorBase
| Implement this interface to provide an allocator for OmpExecutor or ReferenceExecutor. More...
class | CudaAllocatorBase
| Implement this interface to provide an allocator for CudaExecutor. More...
class | HipAllocatorBase
| Implement this interface to provide an allocator for HipExecutor. More...
class | CpuAllocator
| Allocator using new/delete. More...
class | CudaAllocator
| Allocator using cudaMalloc. More...
class | CudaAsyncAllocator
class | CudaUnifiedAllocator
class | CudaHostAllocator
class | HipAllocator
class | HipAsyncAllocator
class | HipUnifiedAllocator
class | HipHostAllocator
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 | EnablePolymorphicObject
| This mixin inherits from (a subclass of) PolymorphicObject and provides a base implementation of a new concrete polymorphic object. 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 | 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...
struct | span
| A span is a lightweight structure used to create sub-ranges from other ranges. More...
struct | local_span
| A span that is used exclusively for local numbering. More...
class | range
| A range is a multidimensional view of the memory. More...
class | scoped_device_id_guard
| This move-only class uses RAII to set the device id within a scoped block, if necessary. More...
struct | segmented_array
| A minimal interface for a segmented array. More...
class | cuda_stream
| An RAII wrapper for a custom CUDA stream. More...
class | hip_stream
| An RAII wrapper for a custom HIP stream. More...
struct | err
class | time_point
| An opaque wrapper for a time point generated by a timer. More...
class | Timer
| Represents a generic timer that can be used to record time points and measure time differences on host or device streams. More...
class | CpuTimer
| A timer using std::chrono::steady_clock for timing. More...
class | CudaTimer
| A timer using events for timing on a CudaExecutor. More...
class | HipTimer
| A timer using events for timing on a HipExecutor. More...
class | DpcppTimer
| A timer using kernels for timing on a DpcppExecutor in profiling mode. More...
struct | are_all_integral
| Evaluates if all template arguments Args fulfill std::is_integral. More...
struct | are_all_integral< First, Args... >
class | precision_reduction
| This class is used to encode storage precisions of low precision algorithms. More...
class | ptr_param
| This class is used for function parameters in the place of raw pointers. More...
class | null_deleter
| This is a deleter that does not delete the object. More...
class | null_deleter< T[]>
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 | stopping_status
| This class is used to keep track of the stopping status of one vector. More...

## Typedefs
template<typename ConcreteFactory, typename ConcreteLinOp, typename ParametersType, typename PolymorphicBase = LinOpFactory>
using | EnableDefaultLinOpFactory
| This is an alias for the EnableDefaultFactory mixin, which correctly sets the template parameters to enable a subclass of LinOpFactory.
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.
template<typename T>
using | is_complex_or_scalar_s = detail::is_complex_or_scalar_impl<T>
| Allows to check if T is a complex or scalar value during compile time by accessing the value attribute of this struct.
template<typename T>
using | remove_complex = typename detail::remove_complex_s<T>::type
| Obtain the type which removed the complex of complex/scalar type or the template parameter of class by accessing the type attribute of this struct.
template<typename T>
using | to_complex = typename detail::to_complex_s<T>::type
| Obtain the type which adds the complex of complex/scalar type or the template parameter of class by accessing the type attribute of this struct.
template<typename T>
using | to_real = remove_complex<T>
| to_real is alias of remove_complex
template<typename T>
using | next_precision_base = typename detail::next_precision_base_impl<T>::type
| Obtains the next type in the singly-linked precision list.
template<typename T>
using | previous_precision_base = next_precision_base<T>
| Obtains the previous type in the singly-linked precision list.
template<typename T, int step = 1>
using | next_precision = typename detail::find_precision_impl<T, step>::type
| Obtains the next move type of T in the singly-linked precision corresponding bfloat16/half.
template<typename T, int step = 1>
using | previous_precision = typename detail::find_precision_impl<T, -step>::type
| Obtains the previous move type of T in the singly-linked precision corresponding bfloat16/half.
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... Ts>
using | highest_precision
| Obtains the smallest arithmetic type that is able to store elements of all template parameter types exactly.
template<typename T, size_type Limit = sizeof(uint16) * byte_size>
using | truncate_type
| 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
| Unsigned integer type capable of holding a pointer to void.
using | float16 = half
| 16 bit 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 class | log_propagation_mode { never , automatic }
| How Logger events are propagated to their Executor. More...
enum class | allocation_mode { device , unified_global , unified_host }
| Specify the mode of allocation for CUDA/HIP GPUs. More...
enum class | layout_type { array , coordinate }
| Specifies the layout type when writing data in matrix market format. More...

## Functions
template<typename ValueType>
ValueType | reduce_add (const array< ValueType > &input_arr, const ValueType init_val=0)
| Reduce (sum) the values in the array.
template<typename ValueType>
void | reduce_add (const array< ValueType > &input_arr, array< ValueType > &result)
| Reduce (sum) the values in the array.
template<typename ValueType>
array< ValueType > | make_array_view (std::shared_ptr< const Executor > exec, size_type size, ValueType *data)
| Helper function to create an array view deducing the value type.
template<typename ValueType>
detail::const_array_view< ValueType > | make_const_array_view (std::shared_ptr< const Executor > exec, size_type size, const ValueType *data)
| Helper function to create a const array view deducing the value type.
template<typename DimensionType>
batch_dim< 2, DimensionType > | transpose (const batch_dim< 2, DimensionType > &input)
| Returns a batch_dim object with its dimensions swapped for batched operators.
template<typename DimensionType>
constexpr dim< 2, DimensionType > | transpose (const dim< 2, DimensionType > &dimensions) noexcept
| Returns a dim<2> object with its dimensions swapped.
template<typename T>
constexpr bool | is_complex ()
| Checks if T is a complex type.
template<typename T>
constexpr bool | is_complex_or_scalar ()
| Checks if T is a complex/scalar type.
template<typename T>
constexpr reduce_precision< T > | round_down (T val)
| Reduces the precision of the input parameter.
template<typename T>
constexpr increase_precision< T > | round_up (T val)
| Increases the precision of the input parameter.
constexpr int64 | ceildiv (int64 num, int64 den)
| Performs integer division with rounding up.
template<typename T>
constexpr T | zero ()
| Returns the additive identity for T.
template<typename T>
constexpr T | zero (const T &)
| Returns the additive identity for T.
template<typename T>
constexpr T | one ()
| Returns the multiplicative identity for T.
template<>
constexpr half | one< half > ()
template<>
constexpr bfloat16 | one< bfloat16 > ()
template<typename T>
constexpr T | one (const T &)
| Returns the multiplicative identity for T.
template<typename T>
constexpr bool | is_zero (T value)
| Returns true if and only if the given value is zero.
template<typename T>
constexpr bool | is_nonzero (T value)
| Returns true if and only if the given value is not zero.
template<typename T>
constexpr T | max (const T &x, const T &y)
| Returns the larger of the arguments.
template<typename T>
constexpr T | min (const T &x, const T &y)
| Returns the smaller of the arguments.
template<typename T>
constexpr auto | real (const T &x)
| Returns the real part of the object.
template<typename T>
constexpr auto | imag (const T &x)
| Returns the imaginary part of the object.
template<typename T>
constexpr auto | conj (const T &x)
| Returns the conjugate of an object.
template<typename T>
constexpr auto | squared_norm (const T &x) -> decltype(real(conj(x) *x))
| Returns the squared norm of the object.
template<typename T>
constexpr std::enable_if_t<!is_complex_s< T >::value, T > | abs (const T &x)
| Returns the absolute value of the object.
template<typename T>
constexpr std::enable_if_t< is_complex_s< T >::value, remove_complex< T > > | abs (const T &x)
gko::half | abs (const std::complex< gko::half > &x)
gko::bfloat16 | abs (const std::complex< gko::bfloat16 > &x)
gko::half | sqrt (gko::half a)
std::complex< gko::half > | sqrt (std::complex< gko::half > a)
gko::bfloat16 | sqrt (gko::bfloat16 a)
std::complex< gko::bfloat16 > | sqrt (std::complex< gko::bfloat16 > a)
template<typename T>
constexpr T | pi ()
| Returns the value of pi.
template<typename T>
constexpr std::complex< remove_complex< T > > | unit_root (int64 n, int64 k=1)
| Returns the value of exp(2 * pi * i * k / n), i.e.
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.
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.
template<typename T>
std::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.
template<typename T>
std::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.
template<typename T>
T | safe_divide (T a, T b)
| Computes the quotient of the given parameters, guarding against division by zero.
template<typename T>
std::enable_if_t<!is_complex_s< T >::value, bool > | is_nan (const T &value)
| Checks if a floating point number is NaN.
template<typename T>
std::enable_if_t< is_complex_s< T >::value, bool > | is_nan (const T &value)
| Checks if any component of a complex value is NaN.
template<typename T>
constexpr std::enable_if_t<!is_complex_s< T >::value, T > | nan ()
| Returns a quiet NaN of the given type.
template<typename T>
constexpr std::enable_if_t< is_complex_s< T >::value, T > | nan ()
| Returns a complex with both components quiet NaN.
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.
template<typename ValueType = default_precision, typename IndexType = int32>
matrix_data< ValueType, IndexType > | read_binary_raw (std::istream &is)
| Reads a matrix stored in Ginkgo's binary matrix format from an input stream.
template<typename ValueType = default_precision, typename IndexType = int32>
matrix_data< ValueType, IndexType > | read_generic_raw (std::istream &is)
| Reads a matrix stored in either binary or matrix market format from an input stream.
template<typename ValueType, typename IndexType>
void | write_raw (std::ostream &os, const matrix_data< ValueType, IndexType > &data, layout_type layout=layout_type::coordinate)
| Writes a matrix_data structure to a stream in matrix market format.
template<typename ValueType, typename IndexType>
void | write_binary_raw (std::ostream &os, const matrix_data< ValueType, IndexType > &data)
| Writes a matrix_data structure to a stream in binary format.
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.
template<typename MatrixType, typename StreamType, typename... MatrixArgs>
std::unique_ptr< MatrixType > | read_binary (StreamType &&is, MatrixArgs &&... args)
| Reads a matrix stored in binary format from an input stream.
template<typename MatrixType, typename StreamType, typename... MatrixArgs>
std::unique_ptr< MatrixType > | read_generic (StreamType &&is, MatrixArgs &&... args)
| Reads a matrix stored either in binary or matrix market format from an input stream.
template<typename MatrixPtrType, typename StreamType, std::enable_if_t<!std::is_same_v< std::remove_cv_t< detail::pointee< MatrixPtrType > >, LinOp > > * = nullptr>
void | write (StreamType &&os, MatrixPtrType &&matrix, layout_type layout=detail::mtx_io_traits< std::remove_cv_t< detail::pointee< MatrixPtrType > > >::default_layout)
| Writes a matrix into an output stream in matrix market format.
void | write (std::ostream &os, ptr_param< const LinOp > matrix)
| Writes a LinOp into an output stream in matrix market format.
template<typename MatrixPtrType, typename StreamType>
void | write_binary (StreamType &&os, MatrixPtrType &&matrix)
| Writes a matrix into an output stream in binary format.
virtual void | convert_to (result_type *result) const =0
| ConvertibleTo interface is used to mark that the implementer can be converted to the object of ResultType.
void | convert_to (ptr_param< result_type > result) const
virtual void | move_to (result_type *result)=0
| Converts the implementer to an object of type result_type by moving data from this object.
void | move_to (ptr_param< result_type > result)
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.
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.
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.
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)
| Converts the object to R and places it on Executor exec.
template<typename ValueType, typename Ptr>
detail::temporary_conversion< std::conditional_t< std::is_const< detail::pointee< Ptr > >::value, const matrix::Dense< ValueType >, matrix::Dense< ValueType > > > | make_temporary_conversion (Ptr &&matrix)
| Convert the given LinOp from matrix::Dense<...> to matrix::Dense<ValueType>.
template<typename ValueType, typename Function, typename... Args>
void | precision_dispatch (Function fn, Args *... linops)
| Calls the given function with each given argument LinOp temporarily converted into matrix::Dense<ValueType> as parameters.
template<typename ValueType, typename Function>
void | precision_dispatch_real_complex (Function fn, const LinOp *in, LinOp *out)
| Calls the given function with the given LinOps temporarily converted to matrix::Dense<ValueType>* as parameters.
template<typename ValueType, typename Function>
void | precision_dispatch_real_complex (Function fn, const LinOp *alpha, const LinOp *in, LinOp *out)
| Calls the given function with the given LinOps temporarily converted to matrix::Dense<ValueType>* as parameters.
template<typename ValueType, typename Function>
void | precision_dispatch_real_complex (Function fn, const LinOp *alpha, const LinOp *in, const LinOp *beta, LinOp *out)
| Calls the given function with the given LinOps temporarily converted to matrix::Dense<ValueType>* as parameters.
template<typename ValueType, typename Function>
void | mixed_precision_dispatch (Function fn, const LinOp *in, LinOp *out)
| Calls the given function with each given argument LinOp converted into matrix::Dense<ValueType> as parameters.
template<typename ValueType, typename Function, std::enable_if_t< is_complex< ValueType >()> * = nullptr>
void | mixed_precision_dispatch_real_complex (Function fn, const LinOp *in, LinOp *out)
| Calls the given function with the given LinOps cast to their dynamic type matrix::Dense<ValueType>* as parameters.
template<typename ValueType, typename Function, std::enable_if_t<!is_complex< ValueType >()> * = nullptr>
void | mixed_precision_dispatch_real_complex (Function fn, const LinOp *in, LinOp *out)
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_operation< Accessor > > | one (const range< Accessor > &operand)
template<typename Accessor>
constexpr range< accessor::abs_operation< Accessor > > | abs (const range< Accessor > &operand)
template<typename Accessor>
constexpr range< accessor::real_operation< Accessor > > | real (const range< Accessor > &operand)
template<typename Accessor>
constexpr range< accessor::imag_operation< Accessor > > | imag (const range< Accessor > &operand)
template<typename Accessor>
constexpr range< accessor::conj_operation< Accessor > > | conj (const range< Accessor > &operand)
template<typename Accessor>
constexpr range< accessor::squared_norm_operation< 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_operation< ::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_operation< ::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_operation< ::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_operation< ::gko::detail::operation_kind::scalar_by_range, FirstOperand, SecondAccessor > > | max (const FirstOperand &first, const range< SecondAccessor > &second)
template<typename Accessor>
constexpr range< accessor::min_operation< ::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_operation< ::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_operation< ::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_operation< ::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)
template<typename Ptr>
detail::temporary_clone< detail::pointee< Ptr > > | make_temporary_clone (std::shared_ptr< const Executor > exec, Ptr &&ptr)
| Creates a temporary_clone.
template<typename Ptr>
detail::temporary_clone< detail::pointee< Ptr > > | make_temporary_output_clone (std::shared_ptr< const Executor > exec, Ptr &&ptr)
| Creates a uninitialized temporary_clone that will be copied back to the input afterwards.
constexpr bool | operator== (precision_reduction x, precision_reduction y) noexcept
| Checks if two precision_reduction encodings are equal.
constexpr bool | operator!= (precision_reduction x, precision_reduction y) noexcept
| Checks if two precision_reduction encodings are different.
template<typename IndexType>
constexpr IndexType | invalid_index ()
| Value for an invalid signed index type.
template<typename Pointer>
detail::cloned_type< Pointer > | clone (const Pointer &p)
| Creates a unique clone of the object pointed to by p.
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.
template<typename OwningPointer>
detail::shared_type< OwningPointer > | share (OwningPointer &&p)
| Marks the object pointed to by p as shared.
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.
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.
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.
template<typename T, typename U>
std::decay_t< T > * | as (U *obj)
| Performs polymorphic type conversion.
template<typename T, typename U>
const std::decay_t< T > * | as (const U *obj)
| Performs polymorphic type conversion.
template<typename T, typename U>
std::decay_t< T > * | as (ptr_param< U > obj)
| Performs polymorphic type conversion on a ptr_param.
template<typename T, typename U>
const std::decay_t< T > * | as (ptr_param< const U > obj)
| Performs polymorphic type conversion.
template<typename T, typename U>
std::unique_ptr< std::decay_t< T > > | as (std::unique_ptr< U > &&obj)
| Performs polymorphic type conversion of a unique_ptr.
template<typename T, typename U>
std::shared_ptr< std::decay_t< T > > | as (std::shared_ptr< U > obj)
| Performs polymorphic type conversion of a shared_ptr.
template<typename T, typename U>
std::shared_ptr< const std::decay_t< T > > | as (std::shared_ptr< const U > obj)
| Performs polymorphic type conversion of a shared_ptr.
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.
std::ostream & | operator<< (std::ostream &os, const version_info &ver_info)
| Prints library version information in human-readable format to a stream.
template<template< typename, typename > class MatrixType, typename... Args>
auto | with_matrix_type (Args &&... create_args)
| This function returns a type that delays a call to MatrixType::create.
template<typename VecPtr>
std::unique_ptr< matrix::Dense< typename detail::pointee< VecPtr >::value_type > > | make_dense_view (VecPtr &&vector)
| Creates a view of a given Dense vector.
template<typename VecPtr>
std::unique_ptr< const matrix::Dense< typename detail::pointee< VecPtr >::value_type > > | make_const_dense_view (VecPtr &&vector)
| Creates a view of a given Dense vector.
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.
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.
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.
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.
bool | operator== (const stopping_status &x, const stopping_status &y)
| Checks if two stopping statuses are equivalent.
bool | operator!= (const stopping_status &x, const stopping_status &y)
| Checks if two stopping statuses are different.

## Variables
constexpr allocation_mode | default_cuda_alloc_mode
constexpr allocation_mode | default_hip_alloc_mode
constexpr size_type | byte_size = CHAR_BIT
| Number of bits in a byte.

## Detailed Description

The Ginkgo namespace.

## Typedef Documentation

## ◆ highest_precision

template<typename... Ts>

using gko::highest_precision

Initial value:
typename detail::highest_precision_variadic<Ts...>::type

Obtains the smallest arithmetic type that is able to store elements of all template parameter types exactly.

All template type parameters need to be either real or complex types, mixing them is not possible.

Formally, it computes a right-fold over the type list, with the highest precision of a pair of real arithmetic types T1, T2 computed as decltype(T1{} + T2{}), or std::complex<highest_precision<remove_complex<T1>, remove_complex<T2>>> for complex types.

## ◆ is_complex_or_scalar_s

template<typename T>

using gko::is_complex_or_scalar_s = detail::is_complex_or_scalar_impl<T>

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

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

Template Parameters

  T | type to check

## ◆ is_complex_s

template<typename T>

using gko::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.

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

Template Parameters

  T | type to check

## ◆ previous_precision_base

template<typename T>

using gko::previous_precision_base = next_precision_base<T>

Obtains the previous type in the singly-linked precision list.

Note
  Currently our lists contains only two elements, so this is the same as next_precision.

## ◆ remove_complex

template<typename T>

using gko::remove_complex = typename detail::remove_complex_s<T>::type

Obtain the type which removed the complex of complex/scalar type or the template parameter of class by accessing the type attribute of this struct.

Template Parameters

  T | type to remove complex

Note
  remove_complex<class> can not be used in friend class declaration.

## ◆ to_complex

template<typename T>

using gko::to_complex = typename detail::to_complex_s<T>::type

Obtain the type which adds the complex of complex/scalar type or the template parameter of class by accessing the type attribute of this struct.

Template Parameters

  T | type to complex_type

Note
  to_complex<class> can not be used in friend class declaration. the followings are the error message from different combination. friend to_complex<Csr>; error: can not recognize it is class correctly. friend class to_complex<Csr>; error: using alias template specialization friend class to_complex_s<Csr<ValueType,IndexType>>::type; error: can not recognize it is class correctly.

## ◆ to_real

template<typename T>

using gko::to_real = remove_complex<T>

to_real is alias of remove_complex

Template Parameters

  T | type to real

## ◆ truncate_type

template<typename T, size_type Limit = sizeof(uint16) * byte_size>

using gko::truncate_type

Initial value:
std::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.

## Enumeration Type Documentation

## ◆ allocation_mode

enum class gko::allocation_mode
| strong

Specify the mode of allocation for CUDA/HIP GPUs.

device allocates memory on the device and Unified Memory model is not used.

unified_global allocates memory on the device, but is accessible by the host through the Unified memory model.

unified_host allocates memory on the host and it is not available on devices which do not have concurrent accesses switched on, but this access can be explicitly switched on, when necessary.

## ◆ layout_type

enum class 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.

## ◆ log_propagation_mode

enum class gko::log_propagation_mode
| strong

How Logger events are propagated to their Executor.

Enumerator
never | Events only get reported at loggers attached to the triggering object. (Except for allocation/free, copy and Operations, since they happen at the Executor).
automatic | Events get reported to loggers attached to the triggering object and propagating loggers (Logger::needs_propagation() return true) attached to its Executor.

## Function Documentation

## ◆ abs()

template<typename T>

std::enable_if_t<!is_complex_s< T >::value, T > gko::abs | ( | const T & | x | ) |
| inlineconstexpr

Returns the absolute value of the object.

Template Parameters

  T | the type of the object

Parameters

  x | the object

Returns
  x >= zero<T>() ? x : -x;

References zero().

Referenced by is_finite().

## ◆ as() [1/7]

template<typename T, typename U>

const std::decay_t< T > * gko::as | ( | const U * | obj | ) |
| inline

Performs polymorphic type conversion.

This is the constant version of the function.

Template Parameters

  T | requested result type
  U | static type of the passed object

Parameters

  obj | the object which should be converted

Returns
  If successful, returns a pointer to the subtype, otherwise throws NotSupported.

## ◆ as() [2/7]

template<typename T, typename U>

const std::decay_t< T > * gko::as | ( | ptr_param< const U > | obj | ) |
| inline

Performs polymorphic type conversion.

This is the constant version of the function.

Template Parameters

  T | requested result type
  U | static type of the passed object

Parameters

  obj | the object which should be converted

Returns
  If successful, returns a pointer to the subtype, otherwise throws NotSupported.

References as(), and gko::ptr_param< T >::get().

## ◆ as() [3/7]

template<typename T, typename U>

std::decay_t< T > * gko::as | ( | ptr_param< U > | obj | ) |
| inline

Performs polymorphic type conversion on a ptr_param.

Template Parameters

  T | requested result type
  U | static type of the passed object

Parameters

  obj | the object which should be converted

Returns
  If successful, returns a pointer to the subtype, otherwise throws NotSupported.

References as(), and gko::ptr_param< T >::get().

## ◆ as() [4/7]

template<typename T, typename U>

std::shared_ptr< const std::decay_t< T > > 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

  T | requested result type
  U | static type of the passed object

Parameters

  obj | the 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() [5/7]

template<typename T, typename U>

std::shared_ptr< std::decay_t< T > > gko::as | ( | std::shared_ptr< U > | obj | ) |
| inline

Performs polymorphic type conversion of a shared_ptr.

Template Parameters

  T | requested result type
  U | static type of the passed object

Parameters

  obj | the 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() [6/7]

template<typename T, typename U>

std::unique_ptr< std::decay_t< T > > gko::as | ( | std::unique_ptr< U > && | obj | ) |
| inline

Performs polymorphic type conversion of a unique_ptr.

Template Parameters

  T | requested result type
  U | static type of the passed object

Parameters

  obj | the 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() [7/7]

template<typename T, typename U>

std::decay_t< T > * gko::as | ( | U * | obj | ) |
| inline

Performs polymorphic type conversion.

Template Parameters

  T | requested result type
  U | static type of the passed object

Parameters

  obj | the object which should be converted

Returns
  If successful, returns a pointer to the subtype, otherwise throws NotSupported.

Referenced by gko::ScaledIdentityAddable::add_scaled_identity(), as(), as(), gko::preconditioner::Ic< LSolverTypeOrValueType, IndexType >::conj_transpose(), gko::preconditioner::Ilu< LSolverTypeOrValueType, USolverTypeOrValueType, ReverseApply, IndexType >::conj_transpose(), gko::preconditioner::Isai< IsaiType==isai_type::general ? isai_type::general :IsaiType==isai_type::spd ? isai_type::spd :IsaiType==isai_type::lower ? isai_type::upper :isai_type::lower, ValueType, IndexType >::get_approximate_inverse(), gko::Permutable< IndexType >::inverse_permute(), gko::Permutable< IndexType >::permute(), gko::preconditioner::Ic< LSolverTypeOrValueType, IndexType >::transpose(), and gko::preconditioner::Ilu< LSolverTypeOrValueType, USolverTypeOrValueType, ReverseApply, IndexType >::transpose().

## ◆ ceildiv()

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

Performs integer division with rounding up.

Parameters

  num | numerator
  den | denominator

Returns
  returns the ceiled quotient.

Referenced by gko::matrix::Csr< ValueType, IndexType >::load_balance::clac_size(), gko::preconditioner::block_interleaved_storage_scheme< IndexType >::compute_storage_space(), and gko::matrix::Csr< ValueType, IndexType >::load_balance::process().

## ◆ 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

  Pointer | type of pointer to the object (plain or smart pointer)

Parameters

  p | a 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::preconditioner::Ic< LSolverTypeOrValueType, IndexType >::operator=(), gko::preconditioner::Ic< LSolverTypeOrValueType, IndexType >::operator=(), gko::preconditioner::Ilu< LSolverTypeOrValueType, USolverTypeOrValueType, ReverseApply, IndexType >::operator=(), gko::preconditioner::Ilu< LSolverTypeOrValueType, USolverTypeOrValueType, ReverseApply, IndexType >::operator=(), gko::solver::EnablePreconditionable< DerivedType >::set_preconditioner(), and gko::solver::EnableIterativeBase< DerivedType >::set_stop_criterion_factory().

## ◆ 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

  Pointer | type of pointer to the object (plain or smart pointer)

Parameters

  exec | the executor where the cloned object should be stored
  p | a 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>

auto gko::conj | ( | const T & | x | ) |
| inlineconstexpr

Returns the conjugate of an object.

Parameters

  x | the number to conjugate

Returns
  conjugate of the object (by default, the object itself)

Referenced by squared_norm().

## ◆ convert_to()

virtual void gko::convert_to | ( | result_type * | result | ) | const
| pure virtual

ConvertibleTo interface is used to mark that the implementer can be converted to the object of ResultType.

This interface is used to enable conversions between polymorphic objects. To mark that an object of type U can be converted to an object of type V, U should implement ConvertibleTo<V>. Then, the implementation of PolymorphicObject::copy_from automatically generated by EnablePolymorphicObject mixin will use RTTI to figure out that U implements the interface and convert it using the convert_to / move_to methods of the interface.

As an example, the following function:

void my_function(const U *u, V *v) {
v->copy_from(u);
}

will convert object u to object v by checking that u can be dynamically casted to ConvertibleTo\<V\>, and calling ConvertibleTo<V>::convert_to(V*)` to do the actual conversion.

In case u is passed as a unique_ptr, call to convert_to will be replaced by a call to move_to and trigger move semantics.

Template Parameters

  ResultType | the type to which the implementer can be converted to, has to be a subclass of PolymorphicObject */ template <typename ResultType> class ConvertibleTo { public: using result_type = ResultType;

virtual ~ConvertibleTo() = default;

/** Converts the implementer to an object of type result_type.

Parameters

  result | the object used to store the result of the conversion

References convert_to(), and gko::ptr_param< T >::get().

Referenced by convert_to().

## ◆ 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

  R | the type to which the object should be converted
  T | the type of the input object

Parameters

  exec | the executor where the result should be placed
  obj | the 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 )

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

  R | the type to which the object should be converted
  T | the type of the input object

Parameters

  exec | the executor where the result should be placed
  obj | the 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

  R | the type to which the object should be converted
  T | the type of the input object

Parameters

  exec | the executor where the result should be placed
  obj | the 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

  R | the type to which the object should be converted
  T | the type of the input object

Parameters

  exec | the executor where the result should be placed
  obj | the object that should be converted

Returns
  a unique pointer (with dynamically bound deleter) to the converted object

## ◆ get_significant_bit()

template<typename T>

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

  T | a numeric type supporting bit shift and comparison

Parameters

  n | a number
  hint | a lower bound for the position o the significant bit

Returns
  maximum of hint and the significant bit position of n

References get_significant_bit().

Referenced by get_significant_bit().

## ◆ get_superior_power()

template<typename T>

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

  T | a numeric type supporting multiplication and comparison

Parameters

  base | the base of the power to be returned
  limit | the lower limit on the size of the power returned
  hint | a 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

  OwningPointer | type of pointer with ownership to the object (has to be a smart pointer)

Parameters

  p | a pointer to the object

Note
  The original pointer p becomes invalid after this call.

## ◆ imag()

template<typename T>

auto gko::imag | ( | const T & | x | ) |
| inlineconstexpr

Returns the imaginary part of the object.

Template Parameters

  T | type of the object

Parameters

  x | the object

Returns
  imaginary part of the object (by default, zero<T>())

## ◆ is_complex()

template<typename T>

bool gko::is_complex | ( |  | ) |
| inlineconstexpr

Checks if T is a complex type.

Template Parameters

  T | type to check

Returns
  true if T is a complex type, false otherwise

Referenced by gko::experimental::distributed::precision_dispatch_real_complex(), gko::experimental::distributed::precision_dispatch_real_complex(), gko::experimental::distributed::precision_dispatch_real_complex(), precision_dispatch_real_complex(), precision_dispatch_real_complex(), and precision_dispatch_real_complex().

## ◆ is_complex_or_scalar()

template<typename T>

bool gko::is_complex_or_scalar | ( |  | ) |
| inlineconstexpr

Checks if T is a complex/scalar type.

Template Parameters

  T | type to check

Returns
  true if T is a complex/scalar type, false otherwise

## ◆ is_finite() [1/2]

template<typename T>

std::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

  T | complex type of the value to check

Parameters

  value | complex value to check

Returns
  true if both components of the given value are finite, meaning they are neither +/- infinity nor NaN.

References is_finite().

## ◆ is_finite() [2/2]

template<typename T>

std::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

  T | type of the value to check

Parameters

  value | value to check

Returns
  true if the value is finite, meaning it are neither +/- infinity nor NaN.

References abs().

Referenced by is_finite().

## ◆ is_nan() [1/2]

template<typename T>

std::enable_if_t< is_complex_s< T >::value, bool > gko::is_nan | ( | const T & | value | ) |
| inline

Checks if any component of a complex value is NaN.

Template Parameters

  T | complex type of the value to check

Parameters

  value | complex value to check

Returns
  true if any component of the given value is NaN.

References is_nan().

## ◆ is_nan() [2/2]

template<typename T>

std::enable_if_t<!is_complex_s< T >::value, bool > gko::is_nan | ( | const T & | value | ) |
| inline

Checks if a floating point number is NaN.

Template Parameters

  T | type of the value to check

Parameters

  value | value to check

Returns
  true if the value is NaN.

References is_nan().

Referenced by is_nan().

## ◆ is_nonzero()

template<typename T>

bool gko::is_nonzero | ( | T | value | ) |
| inlineconstexpr

Returns true if and only if the given value is not zero.

Template Parameters

  T | the type of the value

Parameters

  value | the given value

Returns
  true iff the given value is not zero, i.e. value != zero<T>()

References zero().

Referenced by gko::matrix_data< value_type, index_type >::diag(), gko::matrix_data< value_type, index_type >::matrix_data(), gko::matrix_data< value_type, index_type >::matrix_data(), and gko::matrix_data< value_type, index_type >::matrix_data().

## ◆ is_zero()

template<typename T>

bool gko::is_zero | ( | T | value | ) |
| inlineconstexpr

Returns true if and only if the given value is zero.

Template Parameters

  T | the type of the value

Parameters

  value | the given value

Returns
  true iff the given value is zero, i.e. value == zero<T>()

References zero().

Referenced by gko::matrix_data< value_type, index_type >::remove_zeros().

## ◆ 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

  Pointer | type of pointer to the object (plain or smart pointer)

Parameters

  p | a pointer to the object

Note
  This is the overload for non-owning (plain) pointers, that just returns p.

References lend().

## ◆ 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

  Pointer | type of pointer to the object (plain or smart pointer)

Parameters

  p | a pointer to the object

Note
  This is the overload for owning (smart) pointers, that behaves the same as calling .get() on the smart pointer.

References lend().

Referenced by lend().

## ◆ make_array_view()

template<typename ValueType>

array< ValueType > gko::make_array_view | ( | std::shared_ptr< const Executor > | exec,
|  | size_type | size,
|  | ValueType * | data )

Helper function to create an array view deducing the value type.

Parameters

  exec | the executor on which the array resides
  size | the number of elements for the array
  data | the pointer to the array we create a view on.

Template Parameters

  ValueType | the type of the array elements

Returns
  array<ValueType>::view(exec, size, data)

References make_array_view(), and gko::array< ValueType >::view().

Referenced by gko::array< ValueType >::copy_to_host(), and make_array_view().

## ◆ make_const_array_view()

template<typename ValueType>

detail::const_array_view< ValueType > gko::make_const_array_view | ( | std::shared_ptr< const Executor > | exec,
|  | size_type | size,
|  | const ValueType * | data )

Helper function to create a const array view deducing the value type.

Parameters

  exec | the executor on which the array resides
  size | the number of elements for the array
  data | the pointer to the array we create a view on.

Template Parameters

  ValueType | the type of the array elements

Returns
  array<ValueType>::const_view(exec, size, data)

References gko::array< ValueType >::const_view(), and make_const_array_view().

Referenced by make_const_array_view().

## ◆ make_const_dense_view()

template<typename VecPtr>

std::unique_ptr< const matrix::Dense< typename detail::pointee< VecPtr >::value_type > > gko::make_const_dense_view | ( | VecPtr && | vector | ) |

Creates a view of a given Dense vector.

Template Parameters

  VecPtr | a (smart or raw) pointer to the vector.

Parameters

  vector | the vector on which to create the view

References gko::matrix::Dense< ValueType >::create_const_view_of().

## ◆ make_dense_view()

template<typename VecPtr>

std::unique_ptr< matrix::Dense< typename detail::pointee< VecPtr >::value_type > > gko::make_dense_view | ( | VecPtr && | vector | ) |

Creates a view of a given Dense vector.

Template Parameters

  VecPtr | a (smart or raw) pointer to the vector.

Parameters

  vector | the vector on which to create the view

References gko::matrix::Dense< ValueType >::create_view_of().

## ◆ make_temporary_clone()

template<typename Ptr>

detail::temporary_clone< detail::pointee< Ptr > > gko::make_temporary_clone | ( | std::shared_ptr< const Executor > | exec,
|  | Ptr && | 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

  exec | the executor where the clone will be created
  ptr | a pointer to the object of which the clone will be created

Template Parameters

  Ptr | the (raw or smart) pointer type to be temporarily cloned

Referenced by gko::ScaledIdentityAddable::add_scaled_identity(), gko::LinOp::apply(), gko::LinOp::apply(), gko::LinOp::apply(), gko::LinOp::apply(), gko::matrix::Csr< value_type, index_type >::inv_scale(), and gko::matrix::Csr< value_type, index_type >::scale().

## ◆ make_temporary_conversion()

template<typename ValueType, typename Ptr>

detail::temporary_conversion< std::conditional_t< std::is_const< detail::pointee< Ptr > >::value, const matrix::Dense< ValueType >, matrix::Dense< ValueType > > > gko::make_temporary_conversion | ( | Ptr && | matrix | ) |

Convert the given LinOp from matrix::Dense<...> to matrix::Dense<ValueType>.

The conversion tries to convert the input LinOp to all Dense types with value type recursively reachable by next_precision_base<...> starting from the ValueType template parameter. This means that all real-to-real and complex-to-complex conversions for default precisions are being considered. If the input matrix is non-const, the contents of the modified converted object will be converted back to the input matrix when the returned object is destroyed. This may lead to a loss of precision!

Parameters

  matrix | the input matrix which is supposed to be converted. It is wrapped unchanged if it is already of type matrix::Dense<ValueType>, otherwise it will be converted to this type if possible.

Returns
  a detail::temporary_conversion pointing to the (potentially converted) object.

Exceptions

  NotSupported | if the input matrix cannot be converted to matrix::Dense<ValueType>

Template Parameters

  ValueType | the value type into whose associated matrix::Dense type to convert the input LinOp.

Referenced by precision_dispatch(), gko::experimental::distributed::precision_dispatch_real_complex(), gko::experimental::distributed::precision_dispatch_real_complex(), precision_dispatch_real_complex(), precision_dispatch_real_complex(), and precision_dispatch_real_complex().

## ◆ make_temporary_output_clone()

template<typename Ptr>

detail::temporary_clone< detail::pointee< Ptr > > gko::make_temporary_output_clone | ( | std::shared_ptr< const Executor > | exec,
|  | Ptr && | ptr )

Creates a uninitialized temporary_clone that will be copied back to the input afterwards.

It can be used for output parameters to avoid an unnecessary copy in make_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

  exec | the executor where the uninitialized clone will be created
  ptr | a pointer to the object of which the clone will be created

Template Parameters

  Ptr | the (raw or smart) pointer type to be temporarily cloned

## ◆ max()

template<typename T>

T gko::max | ( | const T & | x,
|  | const T & | y )
| inlineconstexpr

Returns the larger of the arguments.

Template Parameters

  T | type of the arguments

Parameters

  x | first argument
  y | second argument

Returns
  x >= y ? x : y

## ◆ min()

template<typename T>

T gko::min | ( | const T & | x,
|  | const T & | y )
| inlineconstexpr

Returns the smaller of the arguments.

Template Parameters

  T | type of the arguments

Parameters

  x | first argument
  y | second argument

Returns
  x <= y ? x : y

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

## ◆ mixed_precision_dispatch()

template<typename ValueType, typename Function>

void gko::mixed_precision_dispatch | ( | Function | fn,
|  | const LinOp * | in,
|  | LinOp * | out )

Calls the given function with each given argument LinOp converted into matrix::Dense<ValueType> as parameters.

If GINKGO_MIXED_PRECISION is defined, this means that the function will be called with its dynamic type as a static type, so the (templated/generic) function will be instantiated with all pairs of Dense<ValueType> and Dense<next_precision_base<ValueType>> parameter types, and the appropriate overload will be called based on the dynamic type of the parameter.

If GINKGO_MIXED_PRECISION is not defined, it will behave exactly like precision_dispatch.

Parameters

  fn | the given function. It will be called with one const and one non-const matrix::Dense<...> parameter based on the dynamic type of the inputs (GINKGO_MIXED_PRECISION) or of type matrix::Dense<ValueType> (no GINKGO_MIXED_PRECISION).
  in | The first parameter to be cast (GINKGO_MIXED_PRECISION) or converted (no GINKGO_MIXED_PRECISION) and used to call fn.
  out | The second parameter to be cast (GINKGO_MIXED_PRECISION) or converted (no GINKGO_MIXED_PRECISION) and used to call fn.

Template Parameters

  ValueType | the value type to use for the parameters of fn (no GINKGO_MIXED_PRECISION). With GINKGO_MIXED_PRECISION enabled, it only matters whether this type is complex or real.
  Function | the function pointer, lambda or other functor type to call with the converted arguments.

References precision_dispatch().

Referenced by mixed_precision_dispatch_real_complex().

## ◆ mixed_precision_dispatch_real_complex()

template<typename ValueType, typename Function, std::enable_if_t< is_complex< ValueType >()> * = nullptr>

void gko::mixed_precision_dispatch_real_complex | ( | Function | fn,
|  | const LinOp * | in,
|  | LinOp * | out )

Calls the given function with the given LinOps cast to their dynamic type matrix::Dense<ValueType>* as parameters.

If ValueType is real and both in and out are complex, uses matrix::Dense::get_real_view() to convert them into real matrices after precision conversion.

See also
  mixed_precision_dispatch()

References mixed_precision_dispatch(), and precision_dispatch().

## ◆ move_to()

virtual void gko::move_to | ( | result_type * | result | ) |
| pure virtual

Converts the implementer to an object of type result_type by moving data from this object.

This method is used when the implementer is a temporary object, and move semantics can be used.

Parameters

  result | the object used to emplace the result of the conversion

Note
  ConvertibleTo::move_to can be implemented by simply calling ConvertibleTo::convert_to. However, this operation can often be optimized by exploiting the fact that implementer's data can be moved to the result.

References gko::ptr_param< T >::get(), and move_to().

Referenced by move_to().

## ◆ nan() [1/2]

template<typename T>

std::enable_if_t< is_complex_s< T >::value, T > gko::nan | ( |  | ) |
| inlineconstexpr

Returns a complex with both components quiet NaN.

Template Parameters

  T | the type of the object

Returns
  complex{NaN, NaN}.

References nan().

## ◆ nan() [2/2]

template<typename T>

std::enable_if_t<!is_complex_s< T >::value, T > gko::nan | ( |  | ) |
| inlineconstexpr

Returns a quiet NaN of the given type.

Template Parameters

  T | the type of the object

Returns
  NaN.

Referenced by nan().

## ◆ one() [1/2]

template<typename T>

T gko::one | ( |  | ) |
| inlineconstexpr

Returns the multiplicative identity for T.

Returns
  the multiplicative identity for T

Referenced by gko::matrix::SparsityCsr< value_type, index_type >::create(), gko::matrix::SparsityCsr< value_type, index_type >::create(), gko::matrix::SparsityCsr< value_type, index_type >::create_const(), gko::preconditioner::block_interleaved_storage_scheme< IndexType >::get_group_size(), one(), and unit_root().

## ◆ one() [2/2]

template<typename T>

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).

References one().

## ◆ operator!=() [1/2]

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

Checks if two stopping statuses are different.

Parameters

  x | a stopping status
  y | a stopping status

Returns
  true if and only if !(x == y)

## ◆ operator!=() [2/2]

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

Checks if two precision_reduction encodings are different.

Parameters

  x | an encoding
  y | an 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

  os | output stream
  ver | version 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

  os | output stream
  ver_info | version 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

  x | a stopping status
  y | a stopping status

Returns
  true if and only if both x and y have the same mask and converged and finalized state

## ◆ operator==() [2/2]

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

Checks if two precision_reduction encodings are equal.

Parameters

  x | an encoding
  y | an encoding

Returns
  true if and only if x and y are the same encodings

## ◆ pi()

template<typename T>

T gko::pi | ( |  | ) |
| inlineconstexpr

Returns the value of pi.

Template Parameters

  T | the value type to return

Referenced by unit_root().

## ◆ precision_dispatch()

template<typename ValueType, typename Function, typename... Args>

void gko::precision_dispatch | ( | Function | fn,
|  | Args *... | linops )

Calls the given function with each given argument LinOp temporarily converted into matrix::Dense<ValueType> as parameters.

Parameters

  fn | the given function. It will be passed one (potentially const) matrix::Dense<ValueType>* parameter per parameter in the parameter pack linops.
  linops | the given arguments to be converted and passed on to fn.

Template Parameters

  ValueType | the value type to use for the parameters of fn.
  Function | the function pointer, lambda or other functor type to call with the converted arguments.
  Args | the argument type list.

References make_temporary_conversion().

Referenced by mixed_precision_dispatch(), mixed_precision_dispatch_real_complex(), precision_dispatch_real_complex(), precision_dispatch_real_complex(), and precision_dispatch_real_complex().

## ◆ precision_dispatch_real_complex() [1/3]

template<typename ValueType, typename Function>

void gko::precision_dispatch_real_complex | ( | Function | fn,
|  | const LinOp * | alpha,
|  | const LinOp * | in,
|  | const LinOp * | beta,
|  | LinOp * | out )

Calls the given function with the given LinOps temporarily converted to matrix::Dense<ValueType>* as parameters.

If ValueType is real and both in and out are complex, uses matrix::Dense::get_real_view() to convert them into real matrices after precision conversion.

See also
  precision_dispatch()

References is_complex(), make_temporary_conversion(), and precision_dispatch().

## ◆ precision_dispatch_real_complex() [2/3]

template<typename ValueType, typename Function>

void gko::precision_dispatch_real_complex | ( | Function | fn,
|  | const LinOp * | alpha,
|  | const LinOp * | in,
|  | LinOp * | out )

Calls the given function with the given LinOps temporarily converted to matrix::Dense<ValueType>* as parameters.

If ValueType is real and both in and out are complex, uses matrix::Dense::create_real_view() to convert them into real matrices after precision conversion.

See also
  precision_dispatch()

References is_complex(), make_temporary_conversion(), and precision_dispatch().

## ◆ precision_dispatch_real_complex() [3/3]

template<typename ValueType, typename Function>

void gko::precision_dispatch_real_complex | ( | Function | fn,
|  | const LinOp * | in,
|  | LinOp * | out )

Calls the given function with the given LinOps temporarily converted to matrix::Dense<ValueType>* as parameters.

If ValueType is real and both input vectors are complex, uses matrix::Dense::create_real_view() to convert them into real matrices after precision conversion.

See also
  precision_dispatch()

References is_complex(), make_temporary_conversion(), and precision_dispatch().

## ◆ 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

  MatrixType | a ReadableFromMatrixData LinOp type used to store the matrix once it's been read from disk.
  StreamType | type of stream used to write the data to
  MatrixArgs | additional argument types passed to MatrixType constructor

Parameters

  is | input stream from which to read the data
  args | additional arguments passed to MatrixType constructor

Returns
  A MatrixType LinOp filled with data from filename

References read_raw().

## ◆ read_binary()

template<typename MatrixType, typename StreamType, typename... MatrixArgs>

std::unique_ptr< MatrixType > gko::read_binary | ( | StreamType && | is,
|  | MatrixArgs &&... | args )
| inline

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

Template Parameters

  MatrixType | a ReadableFromMatrixData LinOp type used to store the matrix once it's been read from disk.
  StreamType | type of stream used to write the data to
  MatrixArgs | additional argument types passed to MatrixType constructor

Parameters

  is | input stream from which to read the data
  args | additional arguments passed to MatrixType constructor

Returns
  A MatrixType LinOp filled with data from filename

References read_binary_raw().

## ◆ read_binary_raw()

template<typename ValueType = default_precision, typename IndexType = int32>

matrix_data< ValueType, IndexType > gko::read_binary_raw | ( | std::istream & | is | ) |

Reads a matrix stored in Ginkgo's binary matrix format from an input stream.

Note that this format depends on the processor's endianness, so files from a big endian processor can't be read from a little endian processor and vice-versa.

The binary format has the following structure (in system endianness):

1. A 32 byte header consisting of 4 uint64_t values: magic = GINKGO__: The highest two bytes stand for value and index type. value type: S (float), D (double), C (complex<float>), Z(complex<double>) index type: I (int32), L (int64) num_rows: Number of rows num_cols: Number of columns num_entries: Number of (row, column, value) tuples to follow
2. Following are num_entries blocks of size sizeof(IndexType) * 2 + sizeof(ValueType). Each consists of a row index stored as IndexType, followed by a column index stored as IndexType and a value stored as ValueType.

Template Parameters

  ValueType | type of matrix values
  IndexType | type of matrix indexes

Parameters

  is | input 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, column) indexes.

Note
  This is an advanced routine that will return the raw matrix data structure. Consider using gko::read_binary instead.

Referenced by read_binary().

## ◆ read_generic()

template<typename MatrixType, typename StreamType, typename... MatrixArgs>

std::unique_ptr< MatrixType > gko::read_generic | ( | StreamType && | is,
|  | MatrixArgs &&... | args )
| inline

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

Template Parameters

  MatrixType | a ReadableFromMatrixData LinOp type used to store the matrix once it's been read from disk.
  StreamType | type of stream used to write the data to
  MatrixArgs | additional argument types passed to MatrixType constructor

Parameters

  is | input stream from which to read the data
  args | additional arguments passed to MatrixType constructor

Returns
  A MatrixType LinOp filled with data from filename

References read_generic_raw().

## ◆ read_generic_raw()

template<typename ValueType = default_precision, typename IndexType = int32>

matrix_data< ValueType, IndexType > gko::read_generic_raw | ( | std::istream & | is | ) |

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

Template Parameters

  ValueType | type of matrix values
  IndexType | type of matrix indexes

Parameters

  is | input 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, column) indexes.

Note
  This is an advanced routine that will return the raw matrix data structure. Consider using gko::read_generic instead.

Referenced by read_generic().

## ◆ 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

  ValueType | type of matrix values
  IndexType | type of matrix indexes

Parameters

  is | input 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, column) 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>

auto gko::real | ( | const T & | x | ) |
| inlineconstexpr

Returns the real part of the object.

Template Parameters

  T | type of the object

Parameters

  x | the object

Returns
  real part of the object (by default, the object itself)

Referenced by gko::config::pnode::pnode(), and squared_norm().

## ◆ reduce_add() [1/2]

template<typename ValueType>

void gko::reduce_add | ( | const array< ValueType > & | input_arr,
|  | array< ValueType > & | result )

Reduce (sum) the values in the array.

Template Parameters

  The | type of the input data

Parameters

  [in] | input_arr | the input array to be reduced
  [in,out] | result | the reduced value. The result is written into the first entry and the value in the first entry is used as the initial value for the reduce.

References reduce_add().

## ◆ reduce_add() [2/2]

template<typename ValueType>

ValueType gko::reduce_add | ( | const array< ValueType > & | input_arr,
|  | const ValueType | init_val = 0 )

Reduce (sum) the values in the array.

Template Parameters

  The | type of the input data

Parameters

  [in] | input_arr | the input array to be reduced
  [in] | init_val | the initial value

Returns
  the reduced value

References reduce_add().

Referenced by reduce_add(), and reduce_add().

## ◆ round_down()

template<typename T>

reduce_precision< T > gko::round_down | ( | T | val | ) |
| inlineconstexpr

Reduces the precision of the input parameter.

Template Parameters

  T | the original precision

Parameters

  val | the value to round down

Returns
  the rounded down value

## ◆ round_up()

template<typename T>

increase_precision< T > gko::round_up | ( | T | val | ) |
| inlineconstexpr

Increases the precision of the input parameter.

Template Parameters

  T | the original precision

Parameters

  val | the value to round up

Returns
  the rounded up value

## ◆ safe_divide()

template<typename T>

T gko::safe_divide | ( | T | a,
|  | T | b )
| inline

Computes the quotient of the given parameters, guarding against division by zero.

Template Parameters

  T | value type of the parameters

Parameters

  a | the dividend
  b | the divisor

Returns
  the value of a / b if b is non-zero, zero otherwise.

References zero().

## ◆ 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

  OwningPointer | type of pointer with ownership to the object (has to be a smart pointer)

Parameters

  p | a pointer to the object. It must be a temporary or explicitly marked movable (rvalue reference).

Note
  The original pointer p becomes invalid after this call.

Referenced by gko::preconditioner::Ic< LSolverTypeOrValueType, IndexType >::conj_transpose(), gko::preconditioner::Ilu< LSolverTypeOrValueType, USolverTypeOrValueType, ReverseApply, IndexType >::conj_transpose(), gko::preconditioner::Ic< LSolverTypeOrValueType, IndexType >::transpose(), and gko::preconditioner::Ilu< LSolverTypeOrValueType, USolverTypeOrValueType, ReverseApply, IndexType >::transpose().

## ◆ squared_norm()

template<typename T>

auto gko::squared_norm | ( | const T & | x | ) | -> decltype(real(conj(x) *x))
| inlineconstexpr

Returns the squared norm of the object.

Template Parameters

  T | type of the object.

Returns
  The squared norm of the object.

References conj(), and real().

## ◆ transpose() [1/2]

template<typename DimensionType>

batch_dim< 2, DimensionType > gko::transpose | ( | const batch_dim< 2, DimensionType > & | input | ) |
| inline

Returns a batch_dim object with its dimensions swapped for batched operators.

Template Parameters

  DimensionType | datatype used to represent each dimension

Parameters

  dimensions | original object

Returns
  a batch_dim object with dimensions swapped

References gko::batch_dim< Dimensionality, DimensionType >::get_common_size(), gko::batch_dim< Dimensionality, DimensionType >::get_num_batch_items(), and transpose().

Referenced by gko::preconditioner::Ic< LSolverTypeOrValueType, IndexType >::conj_transpose(), gko::preconditioner::Ilu< LSolverTypeOrValueType, USolverTypeOrValueType, ReverseApply, IndexType >::conj_transpose(), gko::preconditioner::Ic< LSolverTypeOrValueType, IndexType >::transpose(), gko::preconditioner::Ilu< LSolverTypeOrValueType, USolverTypeOrValueType, ReverseApply, IndexType >::transpose(), and transpose().

## ◆ transpose() [2/2]

template<typename DimensionType>

dim< 2, DimensionType > gko::transpose | ( | const dim< 2, DimensionType > & | dimensions | ) |
| inlineconstexprnoexcept

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

Template Parameters

  DimensionType | datatype used to represent each dimension

Parameters

  dimensions | original object

Returns
  a dim<2> object with its dimensions swapped

## ◆ unit_root()

template<typename T>

std::complex< remove_complex< T > > gko::unit_root | ( | int64 | n,
|  | int64 | k = 1 )
| inlineconstexpr

Returns the value of exp(2 * pi * i * k / n), i.e.

an nth root of unity.

Parameters

  n | the denominator of the argument
  k | the numerator of the argument. Defaults to 1.

Template Parameters

  T | the corresponding real value type.

References one(), and pi().

## ◆ with_matrix_type()

template<template< typename, typename > class MatrixType, typename... Args>

auto gko::with_matrix_type | ( | Args &&... | create_args | ) |

This function returns a type that delays a call to MatrixType::create.

It can be used to set the used value and index type, as well as the executor at a later stage.

For example, the following code creates first a temporary object, which is then used later to construct an operator of the previously defined base type:

auto type = gko::with_matrix_type<gko::matrix::Csr>();
...
std::unique_ptr<LinOp> concrete_op
if(flag1){
concrete_op = type.template create<double, int>(exec);
} else {
concrete_op = type.template create<float, int>(exec);
}
gko::LinOp
Definition lin_op.hpp:117
gko::with_matrix_type
auto with_matrix_type(Args &&... create_args)
This function returns a type that delays a call to MatrixType::create.
Definition matrix.hpp:127

Note
  This is mainly a helper function to specify the local matrix type for a gko::experimental::distributed::Matrix more easily.

Template Parameters

  MatrixType | A template type that accepts two types, the first one will be set to the value type, the second one to the index type.
  Args | Types of the arguments passed to MatrixType::create.

Parameters

  create_args | arguments that will be forwarded to MatrixType::create

Returns
  A type with a function create<value_type, index_type>(executor).

## ◆ write() [1/2]

void gko::write | ( | std::ostream & | os,
|  | ptr_param< const LinOp > | matrix )

Writes a LinOp into an output stream in matrix market format.

The matrix market format use coordinate format if the sparsity is less than 25%. Otherwise, use array format.

Parameters

  os | output stream where the data is to be written
  matrix | the matrix to write

## ◆ write() [2/2]

template<typename MatrixPtrType, typename StreamType, std::enable_if_t<!std::is_same_v< std::remove_cv_t< detail::pointee< MatrixPtrType > >, LinOp > > * = nullptr>

void gko::write | ( | StreamType && | os,
|  | MatrixPtrType && | matrix,
|  | layout_type | layout = detail::mtx_io_traits< std::remove_cv_t<detail::pointee<MatrixPtrType>>>::default_layout )
| inline

Writes a matrix into an output stream in matrix market format.

Template Parameters

  MatrixPtrType | a (smart or raw) pointer to a WritableToMatrixData object providing data to be written.
  StreamType | type of stream used to write the data to

Parameters

  os | output stream where the data is to be written
  matrix | the matrix to write
  layout | the layout used in the output

References write_raw().

## ◆ write_binary()

template<typename MatrixPtrType, typename StreamType>

void gko::write_binary | ( | StreamType && | os,
|  | MatrixPtrType && | matrix )
| inline

Writes a matrix into an output stream in binary format.

Note that this format depends on the processor's endianness, so files from a big endian processor can't be read from a little endian processor and vice-versa.

Template Parameters

  MatrixPtrType | a (smart or raw) pointer to a WritableToMatrixData object providing data to be written.
  StreamType | type of stream used to write the data to

Parameters

  os | output stream where the data is to be written
  matrix | the matrix to write

References write_binary_raw().

## ◆ write_binary_raw()

template<typename ValueType, typename IndexType>

void gko::write_binary_raw | ( | std::ostream & | os,
|  | const matrix_data< ValueType, IndexType > & | data )

Writes a matrix_data structure to a stream in binary format.

Note that this format depends on the processor's endianness, so files from a big endian processor can't be read from a little endian processor and vice-versa.

Template Parameters

  ValueType | type of matrix values
  IndexType | type of matrix indexes

Parameters

  os | output stream where the data is to be written
  data | the matrix data to write

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_binary instead.

Referenced by write_binary().

## ◆ 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::coordinate )

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

Template Parameters

  ValueType | type of matrix values
  IndexType | type of matrix indexes

Parameters

  os | output stream where the data is to be written
  data | the matrix data to write
  layout | the 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.

References coordinate.

Referenced by write().

## ◆ zero() [1/2]

template<typename T>

T gko::zero | ( |  | ) |
| inlineconstexpr

Returns the additive identity for T.

Returns
  additive identity for T

Referenced by abs(), gko::matrix_data< value_type, index_type >::cond(), gko::matrix_assembly_data< ValueType, IndexType >::get_value(), is_nonzero(), is_zero(), safe_divide(), gko::matrix::Hybrid< ValueType, IndexType >::strategy_type::strategy_type(), gko::matrix_data< value_type, index_type >::sum_duplicates(), and zero().

## ◆ zero() [2/2]

template<typename T>

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).

References zero().

## Variable Documentation

## ◆ default_cuda_alloc_mode

allocation_mode gko::default_cuda_alloc_mode
| constexpr

Initial value:
=
allocation_mode::unified_global

## ◆ default_hip_alloc_mode

allocation_mode gko::default_hip_alloc_mode
| constexpr

Initial value:
=
allocation_mode::unified_global