gko Namespace Reference#
|
Reference API
|
The Ginkgo namespace. More...
Namespaces | |
| namespace | accessor |
| The accessor namespace. | |
| namespace | factorization |
| The Factorization namespace. | |
| namespace | log |
| The logger namespace . Logging. | |
| namespace | matrix |
| The matrix namespace. | |
| namespace | multigrid |
| The multigrid components namespace. | |
| namespace | name_demangling |
| The name demangling namespace. | |
| namespace | preconditioner |
| The Preconditioner namespace. | |
| namespace | reorder |
| The Reorder namespace. | |
| namespace | solver |
| The ginkgo Solve namespace. | |
| namespace | stop |
| The Stopping criterion namespace. Stopping criteria. | |
| namespace | syn |
| The Synthesizer namespace. | |
| namespace | xstd |
| The namespace for functionalities after C++14 standard. | |
Typedefs | |
| template<typename ValueType > | |
| using | Array = array< ValueType > |
| template<typename ConcreteFactory , typename ConcreteLinOp , typename ParametersType , typename PolymorphicBase = LinOpFactory> | |
| using | EnableDefaultLinOpFactory = EnableDefaultFactory< ConcreteFactory, ConcreteLinOp, ParametersType, PolymorphicBase > |
| using | MachineTopology = machine_topology |
| template<typename T > | |
| using | is_complex_s = detail::is_complex_impl< T > |
| template<typename T > | |
| using | is_complex_or_scalar_s = detail::is_complex_or_scalar_impl< T > |
| template<typename T > | |
| using | remove_complex = typename detail::remove_complex_s< T >::type |
| template<typename T > | |
| using | to_complex = typename detail::to_complex_s< T >::type |
| template<typename T > | |
| using | to_real = remove_complex< T > |
| template<typename T > | |
| using | next_precision_base = typename detail::next_precision_base_impl< T >::type |
| template<typename T > | |
| using | previous_precision_base = next_precision_base< T > |
| template<typename T > | |
| using | next_precision = typename detail::next_precision_impl< T >::type |
| template<typename T > | |
| using | previous_precision = next_precision< next_precision< T > > |
| template<typename T > | |
| using | reduce_precision = typename detail::reduce_precision_impl< T >::type |
| template<typename T > | |
| using | increase_precision = typename detail::increase_precision_impl< T >::type |
| template<typename... Ts> | |
| using | highest_precision = typename detail::highest_precision_variadic< Ts... >::type |
| template<typename T , size_type Limit = sizeof(uint16) * byte_size> | |
| using | truncate_type = std::conditional_t< detail::type_size_impl< T >::value >=2 *Limit, typename detail::truncate_type_impl< T >::type, T > |
| using | size_type = std::size_t |
| using | int8 = std::int8_t |
| using | int16 = std::int16_t |
| using | int32 = std::int32_t |
| using | int64 = std::int64_t |
| using | uint8 = std::uint8_t |
| using | uint16 = std::uint16_t |
| using | uint32 = std::uint32_t |
| using | uint64 = std::uint64_t |
| using | uintptr = std::uintptr_t |
| using | float16 = half |
| using | float32 = float |
| using | float64 = double |
| using | full_precision = double |
| using | default_precision = double |
Enumerations | |
| enum class | log_propagation_mode { never , automatic } |
| enum class | allocation_mode { device , unified_global , unified_host } |
| enum class | layout_type { array , coordinate } |
Functions | |
| template<typename ValueType > | |
| ValueType | reduce_add (const array< ValueType > &input_arr, const ValueType init_val=0) |
| template<typename ValueType > | |
| void | reduce_add (const array< ValueType > &input_arr, array< ValueType > &result) |
| template<typename ValueType > | |
| array< ValueType > | make_array_view (std::shared_ptr< const Executor > exec, size_type size, ValueType *data) |
| template<typename ValueType > | |
| detail::const_array_view< ValueType > | make_const_array_view (std::shared_ptr< const Executor > exec, size_type size, const ValueType *data) |
| template<typename DimensionType > | |
| batch_dim< 2, DimensionType > | transpose (const batch_dim< 2, DimensionType > &input) |
| template<typename DimensionType > | |
| constexpr dim< 2, DimensionType > | transpose (const dim< 2, DimensionType > &dimensions) noexcept |
| template<typename T > | |
| constexpr bool | is_complex () |
| template<typename T > | |
| constexpr bool | is_complex_or_scalar () |
| template<typename T > | |
| constexpr reduce_precision< T > | round_down (T val) |
| template<typename T > | |
| constexpr increase_precision< T > | round_up (T val) |
| constexpr int64 | ceildiv (int64 num, int64 den) |
| template<typename T > | |
| constexpr T | zero () |
| template<typename T > | |
| constexpr T | zero (const T &) |
| template<typename T > | |
| constexpr T | one () |
| template<> | |
| constexpr half | one< half > () |
| template<typename T > | |
| constexpr T | one (const T &) |
| template<typename T > | |
| constexpr bool | is_zero (T value) |
| template<typename T > | |
| constexpr bool | is_nonzero (T value) |
| template<typename T > | |
| constexpr T | max (const T &x, const T &y) |
| template<typename T > | |
| constexpr T | min (const T &x, const T &y) |
| template<typename T > | |
| constexpr auto | real (const T &x) |
| template<typename T > | |
| constexpr auto | imag (const T &x) |
| template<typename T > | |
| constexpr auto | conj (const T &x) |
| template<typename T > | |
| constexpr auto | squared_norm (const T &x) -> decltype(real(conj(x) *x)) |
| template<typename T > | |
| constexpr std::enable_if_t<!is_complex_s< T >::value, T > | abs (const T &x) |
| 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::half | sqrt (gko::half a) |
| std::complex< gko::half > | sqrt (std::complex< gko::half > a) |
| template<typename T > | |
| constexpr T | pi () |
| template<typename T > | |
| constexpr std::complex< remove_complex< T > > | unit_root (int64 n, int64 k=1) |
| template<typename T > | |
| constexpr uint32 | get_significant_bit (const T &n, uint32 hint=0u) noexcept |
| template<typename T > | |
| constexpr T | get_superior_power (const T &base, const T &limit, const T &hint=T{1}) noexcept |
| template<typename T > | |
| std::enable_if_t<!is_complex_s< T >::value, bool > | is_finite (const T &value) |
| template<typename T > | |
| std::enable_if_t< is_complex_s< T >::value, bool > | is_finite (const T &value) |
| template<typename T > | |
| T | safe_divide (T a, T b) |
| template<typename T > | |
| std::enable_if_t<!is_complex_s< T >::value, bool > | is_nan (const T &value) |
| template<typename T > | |
| std::enable_if_t< is_complex_s< T >::value, bool > | is_nan (const T &value) |
| template<typename T > | |
| constexpr std::enable_if_t<!is_complex_s< T >::value, T > | nan () |
| template<typename T > | |
| constexpr std::enable_if_t< is_complex_s< T >::value, T > | nan () |
| template<typename ValueType = default_precision, typename IndexType = int32> | |
| matrix_data< ValueType, IndexType > | read_raw (std::istream &is) |
| template<typename ValueType = default_precision, typename IndexType = int32> | |
| matrix_data< ValueType, IndexType > | read_binary_raw (std::istream &is) |
| template<typename ValueType = default_precision, typename IndexType = int32> | |
| matrix_data< ValueType, IndexType > | read_generic_raw (std::istream &is) |
| template<typename ValueType , typename IndexType > | |
| void | write_raw (std::ostream &os, const matrix_data< ValueType, IndexType > &data, layout_type layout=layout_type::coordinate) |
| template<typename ValueType , typename IndexType > | |
| void | write_binary_raw (std::ostream &os, const matrix_data< ValueType, IndexType > &data) |
| template<typename MatrixType , typename StreamType , typename... MatrixArgs> | |
| std::unique_ptr< MatrixType > | read (StreamType &&is, MatrixArgs &&... args) |
| template<typename MatrixType , typename StreamType , typename... MatrixArgs> | |
| std::unique_ptr< MatrixType > | read_binary (StreamType &&is, MatrixArgs &&... args) |
| template<typename MatrixType , typename StreamType , typename... MatrixArgs> | |
| std::unique_ptr< MatrixType > | read_generic (StreamType &&is, MatrixArgs &&... args) |
| template<typename MatrixPtrType , typename StreamType > | |
| void | write (StreamType &&os, MatrixPtrType &&matrix, layout_type layout=detail::mtx_io_traits< std::remove_cv_t< detail::pointee< MatrixPtrType > > >::default_layout) |
| template<typename MatrixPtrType , typename StreamType > | |
| void | write_binary (StreamType &&os, MatrixPtrType &&matrix) |
| 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) |
| 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) |
| template<typename R , typename T > | |
| std::shared_ptr< R > | copy_and_convert_to (std::shared_ptr< const Executor > exec, std::shared_ptr< T > obj) |
| 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) |
| 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) |
| template<typename ValueType , typename Function , typename... Args> | |
| void | precision_dispatch (Function fn, Args *... linops) |
| template<typename ValueType , typename Function > | |
| void | precision_dispatch_real_complex (Function fn, const LinOp *in, LinOp *out) |
| template<typename ValueType , typename Function > | |
| void | precision_dispatch_real_complex (Function fn, const LinOp *alpha, const LinOp *in, LinOp *out) |
| template<typename ValueType , typename Function > | |
| void | precision_dispatch_real_complex (Function fn, const LinOp *alpha, const LinOp *in, const LinOp *beta, LinOp *out) |
| template<typename ValueType , typename Function > | |
| void | mixed_precision_dispatch (Function fn, const LinOp *in, LinOp *out) |
| 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) |
| template<typename Ptr > | |
| detail::temporary_clone< detail::pointee< Ptr > > | make_temporary_output_clone (std::shared_ptr< const Executor > exec, Ptr &&ptr) |
| constexpr bool | operator== (precision_reduction x, precision_reduction y) noexcept |
| constexpr bool | operator!= (precision_reduction x, precision_reduction y) noexcept |
| template<typename IndexType > | |
| constexpr IndexType | invalid_index () |
| template<typename Pointer > | |
| detail::cloned_type< Pointer > | clone (const Pointer &p) |
| template<typename Pointer > | |
| detail::cloned_type< Pointer > | clone (std::shared_ptr< const Executor > exec, const Pointer &p) |
| template<typename OwningPointer > | |
| detail::shared_type< OwningPointer > | share (OwningPointer &&p) |
| template<typename OwningPointer > | |
| std::remove_reference< OwningPointer >::type && | give (OwningPointer &&p) |
| template<typename Pointer > | |
| std::enable_if< detail::have_ownership_s< Pointer >::value, detail::pointee< Pointer > * >::type | lend (const Pointer &p) |
| template<typename Pointer > | |
| std::enable_if<!detail::have_ownership_s< Pointer >::value, detail::pointee< Pointer > * >::type | lend (const Pointer &p) |
| template<typename T , typename U > | |
| std::decay_t< T > * | as (U *obj) |
| template<typename T , typename U > | |
| const std::decay_t< T > * | as (const U *obj) |
| template<typename T , typename U > | |
| std::decay_t< T > * | as (ptr_param< U > obj) |
| template<typename T , typename U > | |
| const std::decay_t< T > * | as (ptr_param< const U > obj) |
| template<typename T , typename U > | |
| std::unique_ptr< std::decay_t< T > > | as (std::unique_ptr< U > &&obj) |
| template<typename T , typename U > | |
| std::shared_ptr< std::decay_t< T > > | as (std::shared_ptr< U > obj) |
| template<typename T , typename U > | |
| std::shared_ptr< const std::decay_t< T > > | as (std::shared_ptr< const U > obj) |
| 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) |
| std::ostream & | operator<< (std::ostream &os, const version_info &ver_info) |
| template<template< typename, typename > class MatrixType, typename... Args> | |
| auto | with_matrix_type (Args &&... create_args) |
| template<typename VecPtr > | |
| std::unique_ptr< matrix::Dense< typename detail::pointee< VecPtr >::value_type > > | make_dense_view (VecPtr &&vector) |
| template<typename VecPtr > | |
| std::unique_ptr< const matrix::Dense< typename detail::pointee< VecPtr >::value_type > > | make_const_dense_view (VecPtr &&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) |
| 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) |
| 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) |
| 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) |
| bool | operator== (const stopping_status &x, const stopping_status &y) noexcept |
| bool | operator!= (const stopping_status &x, const stopping_status &y) noexcept |
Variables | |
| constexpr allocation_mode | default_cuda_alloc_mode |
| constexpr allocation_mode | default_hip_alloc_mode |
| constexpr size_type | byte_size = CHAR_BIT |
Detailed Description
The Ginkgo namespace.
Typedef Documentation
◆ default_precision
| using gko::default_precision = typedef double |
Precision used if no precision is explicitly specified.
◆ float16
| using gko::float16 = typedef half |
Half precision floating point type.
◆ float32
| using gko::float32 = typedef float |
Single precision floating point type.
◆ float64
| using gko::float64 = typedef double |
Double precision floating point type.
◆ full_precision
| using gko::full_precision = typedef double |
The most precise floating-point type.
◆ highest_precision
| using gko::highest_precision = typedef 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.
◆ increase_precision
| using gko::increase_precision = typedef typename detail::increase_precision_impl<T>::type |
Obtains the next type in the hierarchy with higher precision than T.
◆ int16
| using gko::int16 = typedef std::int16_t |
16-bit signed integral type.
◆ int32
| using gko::int32 = typedef std::int32_t |
32-bit signed integral type.
◆ int64
| using gko::int64 = typedef std::int64_t |
64-bit signed integral type.
◆ int8
| using gko::int8 = typedef std::int8_t |
8-bit signed integral type.
◆ is_complex_or_scalar_s
| using gko::is_complex_or_scalar_s = typedef 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
| using gko::is_complex_s = typedef detail::is_complex_impl<T> |
Allows to check if T is a complex value during compile time by accessing the value attribute of this struct. If value is true, T is a complex type, if it is false, T is not a complex type.
- Template Parameters
-
T type to check
◆ next_precision
| using gko::next_precision = typedef typename detail::next_precision_impl<T>::type |
Obtains the next type in the singly-linked precision list with half.
◆ next_precision_base
| using gko::next_precision_base = typedef typename detail::next_precision_base_impl<T>::type |
Obtains the next type in the singly-linked precision list.
◆ previous_precision_base
| using gko::previous_precision_base = typedef 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.
◆ reduce_precision
| using gko::reduce_precision = typedef typename detail::reduce_precision_impl<T>::type |
Obtains the next type in the hierarchy with lower precision than T.
◆ remove_complex
| using gko::remove_complex = typedef 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.
◆ size_type
| using gko::size_type = typedef std::size_t |
Integral type used for allocation quantities.
◆ to_complex
| using gko::to_complex = typedef 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
| using gko::to_real = typedef remove_complex<T> |
to_real is alias of remove_complex
- Template Parameters
-
T type to real
◆ truncate_type
| using gko::truncate_type = typedef 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.
◆ uint16
| using gko::uint16 = typedef std::uint16_t |
16-bit unsigned integral type.
◆ uint32
| using gko::uint32 = typedef std::uint32_t |
32-bit unsigned integral type.
◆ uint64
| using gko::uint64 = typedef std::uint64_t |
64-bit unsigned integral type.
◆ uint8
| using gko::uint8 = typedef std::uint8_t |
8-bit unsigned integral type.
◆ uintptr
| using gko::uintptr = typedef std::uintptr_t |
Unsigned integer type capable of holding a pointer to void
Enumeration Type Documentation
◆ 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
|
strong |
◆ 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()
|
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 abs().
Referenced by abs(), and is_finite().
◆ as() [1/7]
|
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]
|
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 gko::ptr_param< T >::get().
◆ as() [3/7]
|
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 gko::ptr_param< T >::get().
◆ as() [4/7]
|
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]
|
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]
|
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]
|
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::preconditioner::Isai< IsaiType, ValueType, IndexType >::get_approximate_inverse(), and loggers::ResidualLogger< ValueType >::on_iteration_complete().
◆ ceildiv()
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]
|
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 ResidualLogger< ValueType >::on_iteration_complete(), gko::preconditioner::Ic< LSolverType, IndexType >::operator=(), gko::preconditioner::Ilu< LSolverType, USolverType, ReverseApply, IndexType >::operator=(), gko::preconditioner::Ic< LSolverType, IndexType >::operator=(), gko::preconditioner::Ilu< LSolverType, USolverType, ReverseApply, IndexType >::operator=(), gko::solver::EnablePreconditionable< DerivedType >::set_preconditioner(), and gko::solver::EnableIterativeBase< DerivedType >::set_stop_criterion_factory().
◆ clone() [2/2]
|
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()
|
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().
◆ copy_and_convert_to() [1/4]
| 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]
| 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]
| 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]
| 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()
|
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
hintand the significant bit position ofn
References get_significant_bit().
Referenced by gko::preconditioner::Jacobi< ValueType, IndexType >::compute_storage_scheme(), and get_significant_bit().
◆ get_superior_power()
|
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
basenot smaller thanlimit
Referenced by gko::preconditioner::Jacobi< ValueType, IndexType >::compute_storage_scheme().
◆ give()
|
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
pbecomes invalid after this call.
◆ imag()
|
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>())
◆ invalid_index()
|
inlineconstexpr |
Value for an invalid signed index type.
◆ is_complex()
|
inlineconstexpr |
Checks if T is a complex type.
- Template Parameters
-
T type to check
- Returns
trueif T is a complex type,falseotherwise
◆ is_complex_or_scalar()
|
inlineconstexpr |
Checks if T is a complex/scalar type.
- Template Parameters
-
T type to check
- Returns
trueif T is a complex/scalar type,falseotherwise
◆ is_finite() [1/2]
|
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
trueif the value is finite, meaning it are neither +/- infinity nor NaN.
References abs().
Referenced by is_finite().
◆ is_finite() [2/2]
|
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
trueif both components of the given value are finite, meaning they are neither +/- infinity nor NaN.
References is_finite().
◆ is_nan() [1/2]
|
inline |
Checks if a floating point number is NaN.
- Template Parameters
-
T type of the value to check
- Parameters
-
value value to check
- Returns
trueif the value is NaN.
Referenced by is_nan().
◆ is_nan() [2/2]
|
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
trueif any component of the given value is NaN.
References is_nan().
◆ is_nonzero()
|
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>()
Referenced by gko::matrix_data< ValueType, IndexType >::diag(), gko::matrix_data< ValueType, IndexType >::matrix_data(), gko::matrix_data< ValueType, IndexType >::matrix_data(), and gko::matrix_data< ValueType, IndexType >::matrix_data().
◆ is_zero()
|
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>()
Referenced by gko::matrix_data< ValueType, IndexType >::remove_zeros().
◆ lend() [1/2]
|
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.
◆ lend() [2/2]
|
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.
◆ make_array_view()
| 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().
Referenced by gko::matrix::Dense< ValueType >::create_view_of_impl(), gko::segmented_array< T >::get_executor(), and make_array_view().
◆ make_const_array_view()
| 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 make_const_array_view().
Referenced by gko::matrix::Dense< ValueType >::create_const_view_of_impl(), and make_const_array_view().
◆ make_const_dense_view()
| 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()
| 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()
| 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::solver::EnableApplyWithInitialGuess< DerivedType >::apply_with_initial_guess(), gko::solver::EnableApplyWithInitialGuess< DerivedType >::apply_with_initial_guess(), gko::matrix::Csr< ValueType, IndexType >::inv_scale(), and gko::matrix::Csr< ValueType, IndexType >::scale().
◆ make_temporary_conversion()
| 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.
◆ make_temporary_output_clone()
| 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()
|
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()
|
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()
| 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.
◆ mixed_precision_dispatch_real_complex()
| 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()
◆ nan() [1/2]
|
inlineconstexpr |
Returns a quiet NaN of the given type.
- Template Parameters
-
T the type of the object
- Returns
- NaN.
Referenced by nan().
◆ nan() [2/2]
|
inlineconstexpr |
Returns a complex with both components quiet NaN.
- Template Parameters
-
T the type of the object
- Returns
- complex{NaN, NaN}.
References nan().
◆ one() [1/2]
|
inlineconstexpr |
Returns the multiplicative identity for T.
- Returns
- the multiplicative identity for T
Referenced by unit_root().
◆ one() [2/2]
|
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 allowsone(x).
◆ operator!=() [1/2]
|
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]
|
constexprnoexcept |
Checks if two precision_reduction encodings are different.
- Parameters
-
x an encoding y an encoding
- Returns
- true if and only if
xandyare different encodings.
◆ operator<<() [1/2]
|
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]
|
inlinenoexcept |
Checks if two stopping statuses are equivalent.
- Parameters
-
x a stopping status y a stopping status
- Returns
- true if and only if both
xandyhave the same mask and converged and finalized state
◆ operator==() [2/2]
|
constexprnoexcept |
Checks if two precision_reduction encodings are equal.
- Parameters
-
x an encoding y an encoding
- Returns
- true if and only if
xandyare the same encodings
◆ pi()
|
inlineconstexpr |
Returns the value of pi.
- Template Parameters
-
T the value type to return
◆ precision_dispatch()
| 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.
◆ precision_dispatch_real_complex() [1/3]
| 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()
◆ precision_dispatch_real_complex() [2/3]
| 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()
◆ precision_dispatch_real_complex() [3/3]
| 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()
◆ read()
|
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().
Referenced by gko::ReadableFromMatrixData< ValueType, IndexType >::read(), gko::ReadableFromMatrixData< ValueType, IndexType >::read(), and gko::ReadableFromMatrixData< ValueType, IndexType >::read().
◆ read_binary()
|
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()
| 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):
- 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
- 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()
|
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()
| 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()
| 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()
|
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 squared_norm().
◆ reduce_add() [1/2]
| 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]
| 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()
|
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()
|
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()
|
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 / bif b is non-zero, zero otherwise.
◆ share()
|
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
pbecomes invalid after this call.
Referenced by gko::preconditioner::Ic< LSolverType, IndexType >::conj_transpose(), gko::preconditioner::Ilu< LSolverType, USolverType, ReverseApply, IndexType >::conj_transpose(), gko::preconditioner::Isai< IsaiType, ValueType, IndexType >::Isai(), gko::preconditioner::Ic< LSolverType, IndexType >::transpose(), and gko::preconditioner::Ilu< LSolverType, USolverType, ReverseApply, IndexType >::transpose().
◆ squared_norm()
◆ transpose() [1/2]
|
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< LSolverType, IndexType >::conj_transpose(), gko::preconditioner::Ilu< LSolverType, USolverType, ReverseApply, IndexType >::conj_transpose(), gko::preconditioner::Ic< LSolverType, IndexType >::transpose(), gko::preconditioner::Ilu< LSolverType, USolverType, ReverseApply, IndexType >::transpose(), and transpose().
◆ transpose() [2/2]
◆ unit_root()
|
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().
◆ with_matrix_type()
| 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:
- 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()
|
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()
|
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()
| 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()
| 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.
Referenced by write().
◆ zero() [1/2]
|
inlineconstexpr |
Returns the additive identity for T.
- Returns
- additive identity for T
◆ zero() [2/2]
|
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 allowszero(x).
Variable Documentation
◆ byte_size
|
constexpr |
Number of bits in a byte
◆ default_cuda_alloc_mode
|
constexpr |
◆ default_hip_alloc_mode
|
constexpr |
Generated by