Skip to content

Commit cc333b4

Browse files
author
LasNikas
committed
revert CPU transfer
1 parent fab56c3 commit cc333b4

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

src/general/interpolation.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -589,10 +589,8 @@ end
589589
end
590590
end
591591

592-
cache_ = map(x -> Array(x), cache)
593-
594-
return (; computed_density=Array(computed_density), point_coords=Array(point_coords),
595-
neighbor_count=Array(neighbor_count), cache_...)
592+
return (; computed_density=computed_density, point_coords=point_coords,
593+
neighbor_count=neighbor_count, cache...)
596594
end
597595

598596
@inline function create_cache_interpolation(ref_system::FluidSystem, n_points, semi)

test/examples/gpu.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -414,17 +414,17 @@ end
414414
semi_new, semi_new.systems[1], sol;
415415
cut_off_bnd=false)
416416

417-
@test isapprox(result.computed_density,
417+
@test isapprox(Array(result.computed_density),
418418
Float32[500.33255, 893.09766, 997.7032, 1001.14355, 1001.234,
419419
1001.0098, 1000.4352, 999.7572, 999.1139, 989.6319])
420420

421-
@test isapprox(result.density,
421+
@test isapprox(Array(result.density),
422422
Float32[1002.3152, 1002.19653, 1001.99915, 1001.7685,
423423
1001.5382,
424424
1001.3093, 1001.0836, 1000.8649, 1000.635,
425425
1000.4053])
426426

427-
@test isapprox(result.pressure,
427+
@test isapprox(Array(result.pressure),
428428
Float32[5450.902, 5171.2856, 4706.551, 4163.9185, 3621.5042,
429429
3082.6948, 2551.5725, 2036.1208, 1494.8608,
430430
954.14355])
@@ -440,16 +440,16 @@ end
440440
sol;
441441
cut_off_bnd=false)
442442

443-
@test isapprox(result.computed_density,
443+
@test isapprox(Array(result.computed_density),
444444
Float32[250.18625, 500.34482, 499.77225, 254.3632, 499.58026,
445445
999.1413, 998.6351, 503.0122])
446446

447-
@test isapprox(result.density,
447+
@test isapprox(Array(result.density),
448448
Float32[1002.34467, 1002.3365, 1001.5021, 999.7109,
449449
1000.84863,
450450
1000.8373, 1000.3423, 1000.20734])
451451

452-
@test isapprox(result.pressure,
452+
@test isapprox(Array(result.pressure),
453453
Float32[5520.0513, 5501.1846, 3536.2256, -680.5194,
454454
1997.7814,
455455
1971.0717, 805.8584, 488.4068])

0 commit comments

Comments
 (0)