discard references to pointers?

Issue #8 new
Peter Steinbach created an issue

Hi, I keep exploring hcfft. why does the main hcfft API expose references to pointers?

hcfftResult hcfftPlan1d(hcfftHandle *&plan, int nx, hcfftType type);

I don't see any reason why this should be needed? A plain pointer OR a reference would do AFAIK and keep the API simple.

Comments (2)

  1. Neelakandan Ramachandran

    In this example, variable plan, a pointer to hcfftHandle needs to get updated within hcfftPlan1d. There are only two ways for this

    1. passing pointer to pointer
    2. passing reference to pointer

    We chose the second path

  2. Log in to comment