Skip to content

Commit 8d768e2

Browse files
authored
Reduce allocations in ProductFun coefficients (#549)
1 parent dcb2970 commit 8d768e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Multivariate/ProductFun.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ function coefficients(f::ProductFun, ox::Space, oy::Space)
255255
# convert in x direction
256256
#TODO: adaptively grow in x?
257257
for k=1:length(f.coefficients)
258-
B[:,k] = pad(coefficients(f.coefficients[k],ox), m)
258+
copyto!(@view(B[:,k]), coefficients(f.coefficients[k],ox))
259259
end
260260

261261
sp = space(f)

0 commit comments

Comments
 (0)