I have this Int32, Int64, Float32, or Float64 pointer that contains A LOT of dynamically allocated memory. I need to be able to copy data from an Int32 pointer and make it one of the other types. I NEED to copy the data, not cast the pointer. And my Float32 and Float64 MUST be normalized between -1 and 1. Can anybody give me some ideas other than a for loop.
casting (and especially normalizing) has some additional overhead, so there isn't a way to do it in bulk -- at least not one that is premade for you to use.
Or rather, if there is one, it will internally just be a loop like you'd expect.
If a normal loop to traverse the data is too slow, the only thing I could think of to speed it up would be to take advantage of multiple cores and have different threads traverse a smaller portion of the data. Libs like OpenMP were created for that very purpose.