You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way that I can allocate a 2d array of values? If not, is there an elegant way that I can allocate each 1d array, and pass in an array of Array<i32> pointers to the class constructor?
Edit: I guess I could flatten the 2D array, and then pass in the width, but I am hoping that there is a better solution.
The text was updated successfully, but these errors were encountered:
letptr=module.__retain(module.__allocArray(module.OUTER_ID,kernelMultipliers.map(row=>module.__allocArray(module.INNER_ID,row))));letkernel=newmodule.Kernel(ptr);module.__release(ptr);// unless you still need it externally
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I have a class that takes in a 2d array of i32 values. Here is my code:
This is how I am trying to instantiate it:
Is there a way that I can allocate a 2d array of values? If not, is there an elegant way that I can allocate each 1d array, and pass in an array of
Array<i32>
pointers to the class constructor?Edit: I guess I could flatten the 2D array, and then pass in the width, but I am hoping that there is a better solution.
The text was updated successfully, but these errors were encountered: