Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/FFTW.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@ import AbstractFFTs: Plan, ScaledPlan,

export dct, idct, dct!, idct!, plan_dct, plan_idct, plan_dct!, plan_idct!

# FFTW flags from fft.jl
public MEASURE
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case it wasn't clear, public doesn't work in v1.10.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the reminder. I added a VERSION switch.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having public within an if statement did not work; i.e., this fails with the error "Expected end" in v1.12.3 on MacOS:

if true
    public foo
end

Fortunately, having an include within the if statement appears to work, so I isolated the public assertions to a separate file, public.jl, as a workaround. Suggestions welcome.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use something like https://github.com/JuliaStats/StatsAPI.jl/blob/ee9906ddd8cab08b454d1f0088c5285ac7bed1fe/src/StatsAPI.jl#L5-L10. Or Compat.jl which provides a macro for this expression, but in StatsAPI it didn't seem worth adding an additional dependency (in particular due to the large number of packages that depend on StatsAPI).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @devmotion for that very helpful suggestion. I'm giving it a try now.

public DESTROY_INPUT
public UNALIGNED
public CONSERVE_MEMORY
public EXHAUSTIVE
public PRESERVE_INPUT
public PATIENT
public ESTIMATE
public WISDOM_ONLY
public NO_SIMD


include("providers.jl")

function fftw_init_check()
Expand Down
Loading