Skip to content

Commit

Permalink
Prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
gdalle committed Jul 16, 2024
1 parent aad709b commit ce21d2f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import DifferentiationInterfaceTest as DIT
using JLArrays: JLArray, jl
using Random: AbstractRNG, default_rng

num_to_arr_jlvector(x) = num_to_arr(x, JLArray{Float64,1})
num_to_arr_jlmatrix(x) = num_to_arr(x, JLArray{Float64,2})
num_to_arr_jlvector(x) = DIT.num_to_arr(x, JLArray{Float64,1})
num_to_arr_jlmatrix(x) = DIT.num_to_arr(x, JLArray{Float64,2})

DIT.pick_num_to_arr(::Type{<:JLArray{<:Real,1}}) = num_to_arr_jlvector
DIT.pick_num_to_arr(::Type{<:JLArray{<:Real,2}}) = num_to_arr_jlmatrix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ using Random: AbstractRNG, default_rng
using SparseArrays: SparseArrays, SparseMatrixCSC, nnz, spdiagm
using StaticArrays: MArray, MMatrix, MVector, SArray, SMatrix, SVector

num_to_arr_svector(x) = num_to_arr(x, SVector{6,Float64})
num_to_arr_smatrix(x) = num_to_arr(x, SMatrix{2,3,Float64,6})
num_to_arr_svector(x) = DIT.num_to_arr(x, SVector{6,Float64})
num_to_arr_smatrix(x) = DIT.num_to_arr(x, SMatrix{2,3,Float64,6})

DIT.pick_num_to_arr(::Type{<:SVector}) = num_to_arr_svector
DIT.pick_num_to_arr(::Type{<:SMatrix}) = num_to_arr_smatrix
Expand Down

0 comments on commit ce21d2f

Please sign in to comment.