Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • D dune-istl
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 32
    • Issues 32
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 29
    • Merge requests 29
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Core ModulesCore Modules
  • dune-istl
  • Merge requests
  • !519

Draft: Improve support on BCRS custom allocators

  • Review changes

  • Download
  • Patches
  • Plain diff
Open Santiago Ospina De Los Ríos requested to merge feature/improve-bcrs-allocator-support into master Jan 31, 2023
  • Overview 3
  • Commits 1
  • Pipelines 2
  • Changes 2

Currently, allocators in the BCRS matrix do not allow certain operations desired when using custom allocators:

  • An allocator that models a standard Allocator requirements will fail to compile in BCRSMatrix and Blocked vectors due to using size_type = A::size_type. This is changed in this MR by invoking the allocator traits using size_type = std::allocator_traits<A>::size_type.
  • The allocator cannot be set a priory. This is unfortunate because stateful allocators would allow contiguous allocation on different BCRS matrices (e.g. sub-blocks of a bigger BCRS matrix) by sharing the allocator between the different matrices. This is changed in this MR by allowing to get and set the allocator and by copying them during matrix copies. Naturally, this does not change the behavior on stateless allocators like std::allocator<B>.

This MR is part of #107 to improve performance on matrices with low number of entries per rows and nested blocking of BCRSMatrix.

Stateful allocators are out of scope of this MR, thus, I cannot provide tests that check correct behavior on other than std::allocator<B>. If you want this functionality, let me know and I can push a MR with an implementation.

Edited Feb 01, 2023 by Santiago Ospina De Los Ríos
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: feature/improve-bcrs-allocator-support