Skip to content

Separate terrain metadata from the data itself. #15

@JayKickliter

Description

@JayKickliter

The PFL format of VecLen, Spacing, Samples... can be a serious performance bottleneck and isn't necessary. It is a bottle neck in that it either mandates that the source of terrain data adds those fields by default, otherwise it requires a reallocation to prepend those two fields. Let's use this current function signature as an example:

int ITM_P2P_TLS(double h_tx__meter, double h_rx__meter, double pfl[], <SNIP>)

we could switch to

int ITM_P2P_TLS(double h_tx__meter, double h_rx__meter, double terrain[], size_t terrain_len, double terrain_step_size, <SNIP>)

Users who have data natively formatted as PFL (side note, what is the origin and meaning of pfl?) can still call the modified function with no overhead:

double * pfl = <externally defined>;
size_t terrain_len = static_cast<size_t>([0]);
double terrain_step_size = pfl[1];
double * terrain = &pfl[2];
ITM_P2P_TLS(h_tx__meter, h_rx__meter, terrain, terrain_len, terrain_step_size, <SNIP>);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions