|
203 | 203 | @test ldiv!(op, w) ≈ (α * D) \ v |
204 | 204 | end |
205 | 205 |
|
206 | | -function apply_op!(H, du, u, p, t) |
207 | | - H(du, u, p, t) |
208 | | - return nothing |
209 | | -end |
210 | | - |
211 | | -test_apply_noalloc(H, du, u, p, t) = @test_broken (@allocations apply_op!(H, du, u, p, t)) == 0 |
212 | | - |
213 | 206 | @testset "AddedOperator" begin |
214 | 207 | A = rand(N, N) |> MatrixOperator |
215 | 208 | B = rand(N, N) |> MatrixOperator |
@@ -284,25 +277,6 @@ test_apply_noalloc(H, du, u, p, t) = @test_broken (@allocations apply_op!(H, du, |
284 | 277 | @test !isa(op, AddedOperator) |
285 | 278 | end |
286 | 279 |
|
287 | | - # Allocations Tests with new interface |
288 | | - |
289 | | - # Define a function to test allocations with the new interface |
290 | | - function apply_op_new!(H, du, v, u, p, t) |
291 | | - H(du, v, u, p, t) |
292 | | - return nothing |
293 | | - end |
294 | | - |
295 | | - if VERSION >= v"1.11" |
296 | | - test_apply_noalloc_new(H, du, v, u, p, t) = @test (@allocations apply_op_new!(H, du, v, u, p, t)) == 0 |
297 | | - |
298 | | - @allocations apply_op_new!(op, w, v, u, p, t) # warmup |
299 | | - test_apply_noalloc_new(op, w, v, u, p, t) |
300 | | - |
301 | | - ## Original allocations test |
302 | | - @allocations apply_op!(op, v, u, p, t) # warmup |
303 | | - test_apply_noalloc(op, v, u, p, t) |
304 | | - end |
305 | | - |
306 | 280 | ## Time-Dependent Coefficients |
307 | 281 |
|
308 | 282 | for T in (Float32, Float64, ComplexF32, ComplexF64) |
@@ -331,20 +305,6 @@ test_apply_noalloc(H, du, u, p, t) = @test_broken (@allocations apply_op!(H, du, |
331 | 305 | du = similar(u) |
332 | 306 | p = (ω = 0.1,) |
333 | 307 | t = 0.1 |
334 | | - |
335 | | - if VERSION >= v"1.11" |
336 | | - # Test allocations with original interface |
337 | | - @allocations apply_op!(H_sparse, du, u, p, t) # warmup |
338 | | - @allocations apply_op!(H_dense, du, u, p, t) # warmup |
339 | | - test_apply_noalloc(H_sparse, du, u, p, t) |
340 | | - test_apply_noalloc(H_dense, du, u, p, t) |
341 | | - |
342 | | - # Test allocations with new interface |
343 | | - @allocations apply_op_new!(H_sparse, du, v, u, p, t) # warmup |
344 | | - @allocations apply_op_new!(H_dense, du, v, u, p, t) # warmup |
345 | | - test_apply_noalloc_new(H_sparse, du, v, u, p, t) |
346 | | - test_apply_noalloc_new(H_dense, du, v, u, p, t) |
347 | | - end |
348 | 308 | end |
349 | 309 | end |
350 | 310 |
|
|
0 commit comments