Commit Graph

3 Commits

Author SHA1 Message Date
Kenneth Moreland
4c524de625 Fix inverted ArrayCopy arguments
Also fix condition where a `UnknownArrayHandle` destination does not
have an underlying `ArrayHandle` set yet.
2021-02-02 17:34:12 -07:00
Kenneth Moreland
ad7033684f Change ArrayCopy of UnknownArrayHandle to limit types
Rather than copy every type to every other type, only copy for the same
base type or copy to/from FloatDefault. This should reduce the amount of
code generated by a lot.

This reduces the size of the .o for ArrayCopy.cxx on my mac from
21MB to 7.7MB.
2021-02-02 17:33:08 -07:00
Kenneth Moreland
916a01d7b9 Add general ArrayCopy between UnknownArrayHandles
Add an overload of `ArrayCopy` that takes `UnknownArrayHandle`s and
copies them for (almost) any `ArrayHandle` type.

The code uses `CastAndCallWithExtractedArray` to reduce the total number
of copy conditions to about 100, which are all precompiled into the
library. On a debug build on my mac, this creates a .o file of 21MB.
That's not great, but not terrible. Hopefully, this can be used to
consolidate copy implementations elsewhere.
2021-02-02 17:33:08 -07:00