Replies: 6 comments
-
You would probably have more luck getting your framework to support a single-dimensional array (or Span) than getting such a feature (that would require significant runtime support) to the language. |
Beta Was this translation helpful? Give feedback.
-
If your data visualisation accepts an abstraction (e.g. |
Beta Was this translation helpful? Give feedback.
-
No. Although their elements layout are same, their array headers are different.
CLR does have faking feature for array, like |
Beta Was this translation helpful? Give feedback.
-
Additional notes: |
Beta Was this translation helpful? Give feedback.
-
I agree that the header is different. But the data layout is the same. That's why I can BlockCopy a single dim to a multi dim array. Faking would also fake the header. It's not really different than having a subclass of double[,] that uses a double[] as its backing store. However I can't do that right now. |
Beta Was this translation helpful? Give feedback.
-
The memory&header layout of arrays and strings are strictly known everywhere, to avoid performance issues. That's why they cannot be subclass'd. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have two framework in which I have an array to manage storage for data. The data layer uses a Matrix class with a single dim array as its backing storage. The other framework, for data visualization, uses a multidim array as its input. The only way to transfer the data is with a copy, which is a shame since internally the memory layout of the single and multidim array is exactly the same. Wouldn't it be useful to be able to fake a multidim array from a single dim one?
Beta Was this translation helpful? Give feedback.
All reactions