Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate terrain metadata from the data itself. #15

Open
JayKickliter opened this issue Feb 15, 2024 · 0 comments
Open

Separate terrain metadata from the data itself. #15

JayKickliter opened this issue Feb 15, 2024 · 0 comments

Comments

@JayKickliter
Copy link

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>);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant