wll-interface
wll-interface copied to clipboard
question about returning by reference + `PackedArray`
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::tensor
s caused the kernel to crash.