Skip to content

Make some internal methods accessible publicly #238

@jay-sridharan

Description

@jay-sridharan

Hello again!

I am using this library for a real-time motion control application. To this effect, I cannot have any syscalls once the system is operational, as it introduces non-determinism. This includes malloc.

Tinyspline is really close to what I need because memory allocation is well-contained, and I have been able to write most of what I need using pre-allocated buffers. However, there are some things that would be useful to have exposed to make this possible.

What are your thoughts on including these definitions in tinyspline.h ?

    struct tsBSplineImpl
    {
        size_t deg;
        size_t dim;
        size_t n_ctrlp;
        size_t n_knots;
    };

    struct tsDeBoorNetImpl
    {
        double u;
        size_t k;
        size_t s;
        size_t h;
        size_t dim;
        size_t n_points;
    };
    
    tsError ts_int_bspline_eval_woa(const tsBSpline *spline, tsReal u, tsDeBoorNet *net, tsStatus *status);

I need ts_int_bspline_eval_woa because ts_bspline_eval calls malloc. The struct definitions are useful to have so that I can call sizeof(tsBSplineImpl) in the calculation for my static memory allocation, and similarly for tsDeBoorNetImpl

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions