Skip to content

Commit

Permalink
fix inplace batch integrand
Browse files Browse the repository at this point in the history
  • Loading branch information
lxvm committed Jan 3, 2024
1 parent e6a2c67 commit d064ace
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/interface_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,12 @@ batch_f_v(f, nout) = (pts, p) -> begin
fevals
end

# TODO ? check if pts is a vector or matrix
batch_iip_f_v(f, nout) = (fevals, pts, p) -> begin
for i in 1:size(pts, 2)
x = pts[:, i]
for i in axes(pts, ndims(pts))
x = pts isa Vector ? pts[i] : pts[:, i]
fevals[:, i] .= f(x, p, nout)
end
nothing
return
end

@testset "Standard Single Dimension Integrands" begin
Expand Down

0 comments on commit d064ace

Please sign in to comment.