Skip to content

Allow rerun::Collection to borrow strided & offseted data #4257

@Wumpf

Description

@Wumpf

In order to support borrowing of existing image data well, we have to be able to support arbitrary strides on borrowed pointers.

To that end all our serialization methods have to work with rerun::Collection instead of getting a pointer and a size.

Talking to a user, not only strides would be useful but also byte offsets. Example: Struct like this:

struct PointAndColor { float x,y,z; uint32_t color; }
https://github.com/adujardin/zed-rerun-io/blob/dfaa374e900ff60720060759f7018e8dcdd9ae90/rerun_depth_sensing/src/main.cpp#L100

However, we likely can disregard owned data for this and focus solely on borrowed data.
Also, if it helps we can restrict this to POD data (data where we don't have to call a destructor)

Focusing on non-owned data allows to re-use the space taken by the deallocator pointer proposed in:

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestsdk-cppC/C++ API specific

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions