Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sized ctor and public add_operator to Combination #1771

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

greole
Copy link
Collaborator

@greole greole commented Jan 22, 2025

This PR makes the Combination::add_operators member public so that operators can be added after constructing a combination matrix. Additionally, a new constructor is added so that an empty combination can be created first and additional operators are added later.

The Ginkgo team is proud to announce the new Ginkgo minor release 1.9.0.

This release brings new features such as:
- Support for half precision (IEEE FP16). The type `gko::half` can now be selected in most instances as the value type
  of a matrix, solver, preconditioner, etc. If the selected backend supports FP16 as a native type, the native type is
  used within the kernels, otherwise an overhead might occur. The new behavior is enabled by default, but it can be
  turned off during configuration.
- New implementations of the ILU and IC factorization for CUDA, HIP, OpenMP, and Reference backends. These are
  available in addition to the existing implementations based on the vendor libraries cuSPARSE and hipSPARSE.
- New (S)SOR and Gauss-Seidel preconditioners.
- Simplifyied distributed matrix assembly by exchanging local rows between neighboring processes.

And more!

See [the Changelog](./CHANGELOG.md) for more information.
@ginkgo-bot ginkgo-bot added the mod:core This is related to the core module. label Jan 22, 2025
@upsj
Copy link
Member

upsj commented Jan 22, 2025

Can you describe a use case for this? Combination creation is pretty lightweight, so I am hesitant to add more complexity there.

@greole
Copy link
Collaborator Author

greole commented Jan 22, 2025

Sure and maybe there is a better way to do it. On the OGL side I have std::vector<gko::LinOp> of local and non_local linops representing local and non_local interfaces for Distributed::Matrix. Probably, I could also use this ctr

    explicit Combination(CoefficientIterator coefficient_begin,
                         CoefficientIterator coefficient_end,
                         OperatorIterator operator_begin,
                         OperatorIterator operator_end)

but there are cases (after repartitioning) where operator_begin==operator_end thus it would throw.

@upsj
Copy link
Member

upsj commented Jan 22, 2025

Making the empty case work seems sensible, except for the fact that we don't have anything to base the size on then. BTW ctr is kind of a misleading abbreviation, it could be counter or constructor.

@greole greole changed the title Add sized ctr and public add_operator to Combination Add sized ctor and public add_operator to Combination Jan 22, 2025
@MarcelKoch MarcelKoch self-requested a review February 13, 2025 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mod:core This is related to the core module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants