Skip to content

Commit 9174d45

Browse files
committed
fix WrappedBasis gpu eval
1 parent 6cda5ca commit 9174d45

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/wrappedbasis.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ function _ka_evaluate_launcher!(P, dP,
9292
basis::WrappedBasis,
9393
X::AbstractVector{<: Number},
9494
ps, st)
95+
96+
__dualize(x)= FD.Dual(x, one(eltype(x)))
9597

9698
if isnothing(dP)
9799
Pl, _ = basis.l(X, ps, st)
@@ -100,7 +102,9 @@ function _ka_evaluate_launcher!(P, dP,
100102
TX = eltype(X)
101103
TP = _valtype(basis, TX)
102104
TXd = typeof(FD.Dual(one(TX), one(TX)))
103-
Xd = map(x -> FD.Dual(x, one(TX)), X)
105+
Xd = similar(X, TXd)
106+
map!(__dualize, Xd, X)
107+
# Xd = map(x -> FD.Dual(x, one(TX)), X)
104108
Pd, _ = basis.l(Xd, ps, st)
105109

106110
map!(pd -> pd.value, P, Pd)

0 commit comments

Comments
 (0)