Skip to content

question about returning by reference + PackedArray #5

@samuelpmish

Description

@samuelpmish

Thank you for developing wll-interface, it's been incredibly useful in my personal projects. My question is:

Is there a way to return a wll::tensor by-reference if the dimensions are not known a priori?

Right now, I'm splitting up any C++ routines that have multiple returns into:

  • one function that calculates the outputs and writes them to some global variable
  • "getters" that access that global and return each output individually

Returning multiple things by-reference would be cleaner and thread-safe, but when I tried it, my C++ functions that resized the by-reference output wll::tensors caused the kernel to crash.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions