Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.
This repository was archived by the owner on Aug 22, 2025. It is now read-only.

out of place tag not being recorded properly #314

@Veenty

Description

@Veenty

The out of place JacVec is not taking properly the tag parameter for out of place operations

using SparseDiffTools
using ForwardDiff
using LinearAlgebra

N = 10
A = rand(N,N)
function foo(x)
    println(typeof(x))
    return A*x
end

function foo!(y,x)
    println(typeof(x))
    mul!(y,A,x)
    return y 
end

J = JacVec(foo, rand(N), tag = nothing)
J! = JacVec(foo!, rand(N), tag = nothing)
J*rand(N);  #Vector{ForwardDiff.Dual{ForwardDiff.Tag{SparseDiffTools.DeivVecTag, Float64}, Float64, 1}}


y = similar(rand(N));
mul!(y, J, rand(N)); #Vector{ForwardDiff.Dual{Nothing, Float64, 1}}


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions