@@ -27,15 +27,15 @@ function sumvalues_indices(itp)
27
27
ntuple (d-> collect (range (first (inds[d])+ 0.001 , stop= last (inds[d])- 0.001 , length= n)), ndims (itp))
28
28
end
29
29
30
- strip_prefix (str) = replace (str, " Interpolations." => " " )
30
+ strip_prefix (str:: AbstractString ) = replace (str, " Interpolations." => " " )
31
31
benchstr (:: Type{T} ) where {T<: Interpolations.GridType } = strip_prefix (string (T))
32
32
33
33
benchstr (:: Type{Constant} ) = " Constant()"
34
34
benchstr (:: Type{Linear} ) = " Linear()"
35
- benchstr (:: Type{Quadratic{BC}} ) where {BC<: Interpolations.Flag } =
36
- string (" Quadratic(" , strip_prefix (string (BC)), " ())" )
37
- benchstr (:: Type{Cubic{BC}} ) where {BC<: Interpolations.Flag } =
38
- string (" Quadratic (" , strip_prefix (string (BC)), " ())" )
35
+ benchstr (:: Type{Quadratic{BC}} , :: Type{GT} ) where {BC<: Interpolations.BoundaryCondition ,GT <: Interpolations.GridType } =
36
+ string (" Quadratic(" , strip_prefix (string (BC)), " (" , strip_prefix ( string (GT)), " () ))" )
37
+ benchstr (:: Type{Cubic{BC}} , :: Type{GT} ) where {BC<: Interpolations.BoundaryCondition ,GT <: Interpolations.GridType } =
38
+ string (" Cubic (" , strip_prefix (string (BC)), " (" , strip_prefix ( string (GT)), " () ))" )
39
39
40
40
groupstr (:: Type{Constant} ) = " constant"
41
41
groupstr (:: Type{Linear} ) = " linear"
@@ -62,7 +62,7 @@ for A in (collect(Float64, 1:3),
62
62
gstr = groupstr (Quadratic)
63
63
for BC in (Flat,Line,Free,Periodic,Reflect,Natural), GT in (OnGrid, OnCell)
64
64
Ac = copy (A)
65
- idstr = string (ndims (A), " d_" , benchstr (Quadratic{BC}), ' _ ' , benchstr ( GT))
65
+ idstr = string (ndims (A), " d_" , benchstr (Quadratic{BC}, GT))
66
66
suite[" bsplines" ][gstr][string (idstr, " _construct" )] =
67
67
@benchmarkable interpolate ($ Ac, BSpline (Quadratic ($ BC ($ GT ()))))
68
68
itp = interpolate (copy (A), BSpline (Quadratic (BC (GT ()))))
@@ -72,7 +72,7 @@ for A in (collect(Float64, 1:3),
72
72
end
73
73
for BC in (InPlace,InPlaceQ)
74
74
Ac = copy (A)
75
- idstr = string (ndims (A), " d_" , benchstr (Quadratic{BC}), ' _ ' , benchstr ( OnCell))
75
+ idstr = string (ndims (A), " d_" , benchstr (Quadratic{BC}, OnCell))
76
76
suite[" bsplines" ][gstr][string (idstr, " _construct" )] =
77
77
@benchmarkable interpolate! ($ Ac, BSpline (Quadratic ($ BC (OnCell ()))))
78
78
itp = interpolate! (copy (A), BSpline (Quadratic (BC (OnCell ()))))
@@ -84,7 +84,7 @@ for A in (collect(Float64, 1:3),
84
84
gstr = groupstr (Cubic)
85
85
for BC in (Flat,Line,Free,Periodic), GT in (OnGrid, OnCell)
86
86
Ac = copy (A)
87
- idstr = string (ndims (A), " d_" , benchstr (Cubic{BC}), ' _ ' , benchstr ( GT))
87
+ idstr = string (ndims (A), " d_" , benchstr (Cubic{BC}, GT))
88
88
suite[" bsplines" ][gstr][string (idstr, " _construct" )] =
89
89
@benchmarkable interpolate ($ Ac, BSpline (Cubic ($ BC ($ GT ()))))
90
90
itp = interpolate (copy (A), BSpline (Cubic (BC (GT ()))))
0 commit comments