Skip to content

Support @view or slice etc in C++ arguments #496

@tallakt

Description

@tallakt

Hi

I am working on a project where I am passing large data sets between Julia and C++.

It would be nice if I did not have to collect(...) my sliced/viewed data into arrays before sending them to C++. Maybe something like:

function test(jlcxx::GenericMatrix<float, 2> mat) {
  int rows = mat.size(0);
  int cols = mat.size(1);
  for (...) {
    float cpp_tmp = mat.at(i, j);
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions