Archived

This forum has been archived. Please start a new discussion on GitHub.

Best way to avoid deep copies when sending a large floating point sequence

kandel3
edited August 2017 in Help Center

I have a slice that maps to an std::vector<float>. Although expected, I was hoping for there to be a way to avoid a deep copy when my program can only pass pointers. I need to use pointers because of exotic memory allocation requirements, aka page locked, etc.

At present I'm deep copying the pointed data into a vector, but I think something exists for strings (that maps to string_view). I can't figure out how to apply this to a sequence of floating point data.

sequence<float> InteropBuffer;
interface Interop
{
    void sendData(InteropBuffer input);
};
Tagged:

Comments