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

[oneMKL][Sparse BLAS] Missing constructor for oneapi::mkl::sparse::matrix_view #578

Open
gajanan-choudhary opened this issue Sep 17, 2024 · 1 comment · May be fixed by oneapi-src/oneMKL#608
Assignees
Labels

Comments

@gajanan-choudhary
Copy link
Contributor

gajanan-choudhary commented Sep 17, 2024

It appears that we are missing a constructor:

    matrix_view(matrix_descr type_view, uplo uplo_view, diag diag_view);

in the oneapi::mkl::sparse::matrix_view data structure.
While it is possible for users to individually have:

    matrix_view view;
    view.type_view = ...;
    view.uplo_view = ...;
    view.diag_view = ...;

in their code, it would be helpful to allow:

    using namespace oneapi::mkl;
    sparse::matrix_view view{sparse::matrix_descr::triangular, uplo::upper, diag::unit};

Without a triplet constructor, we have errors like so:

foo.cpp:28:87: error: no matching function for call to ‘oneapi::mkl::sparse::matrix_view::matrix_view(<brace-enclosed initializer list>)’
   28 |     sparse::matrix_view view{sparse::matrix_descr::triangular, uplo::upper, diag::unit};
      |                                                                                       ^
foo.cpp:19:9: note: candidate: ‘oneapi::mkl::sparse::matrix_view::matrix_view(oneapi::mkl::sparse::matrix_descr)’
   19 |         matrix_view(matrix_descr type_view);
      |         ^~~~~~~~~~~
foo.cpp:19:9: note:   candidate expects 1 argument, 3 provided
foo.cpp:17:9: note: candidate: ‘constexpr oneapi::mkl::sparse::matrix_view::matrix_view()’
   17 |         matrix_view() = default;
      |         ^~~~~~~~~~~
foo.cpp:17:9: note:   candidate expects 0 arguments, 3 provided
foo.cpp:12:12: note: candidate: ‘constexpr oneapi::mkl::sparse::matrix_view::matrix_view(const oneapi::mkl::sparse::matrix_view&)’
   12 |     struct matrix_view {
      |            ^~~~~~~~~~~
foo.cpp:12:12: note:   candidate expects 1 argument, 3 provided
foo.cpp:12:12: note: candidate: ‘constexpr oneapi::mkl::sparse::matrix_view::matrix_view(oneapi::mkl::sparse::matrix_view&&)’
foo.cpp:12:12: note:   candidate expects 1 argument, 3 provided

@Rbiessy, @spencerpatty, @baeseung-intel

@Rbiessy
Copy link
Contributor

Rbiessy commented Sep 18, 2024

Sure, this constructor can be added easily. We'll get to it when we can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants