-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2014 from CliMA/dy/number_methods
Remove unnecessary method specializations for Numbers
- Loading branch information
Showing
5 changed files
with
47 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
test/MatrixFields/matrix_fields_broadcasting/test_non_scalar_5.jl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#= | ||
julia --project | ||
using Revise; include(joinpath("test", "MatrixFields", "matrix_fields_broadcasting", "test_non_scalar_1.jl")) | ||
=# | ||
import ClimaCore | ||
#! format: off | ||
if !(@isdefined(unit_test_field_broadcast)) | ||
include(joinpath(pkgdir(ClimaCore),"test","MatrixFields","matrix_fields_broadcasting","test_non_scalar_utils.jl")) | ||
end | ||
#! format: on | ||
test_opt = get(ENV, "BUILDKITE", "") == "true" | ||
@testset "matrix of vectors divided by scalar" begin | ||
|
||
bc = @lazy @. ᶜᶠmat_C12 / 2 | ||
result = materialize(bc) | ||
|
||
ref_set_result! = | ||
result -> (@. result = | ||
map(Geometry.Covariant12Vector, ᶜᶠmat2 / 2, ᶜᶠmat3 / 2)) | ||
|
||
unit_test_field_broadcast( | ||
result, | ||
bc; | ||
ref_set_result!, | ||
allowed_max_eps_error = 0, | ||
) | ||
|
||
test_opt && opt_test_field_broadcast(result, bc; ref_set_result!) | ||
test_opt && !using_cuda && perf_getidx(bc) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters