Skip to content

Conversation

@vchuravy
Copy link
Member

No description provided.

@github-actions
Copy link

Once the build has completed, you can preview your PR at this URL: https://NumericalMathematics.github.io/Ariadne.jl/previews/PR87/ in a couple of minutes.

function init_cache(x, ::Val{N}) where {N}
if !Enzyme.Compiler.guaranteed_const(typeof(x))
return ntuple(_ -> Enzyme.make_zero(x), Val(N))
return ntuple(_ -> create_shadow(x), Val(N))
Copy link
Member

Choose a reason for hiding this comment

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

Why create an anonymous function if you can use

Suggested change
return ntuple(_ -> create_shadow(x), Val(N))
return ntuple(create_shadow, Val(N))

directly?

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

Successfully merging this pull request may close these issues.

2 participants