Skip to content

Error while velocity datatype is ReverseDiff.TrackedReal{Float64,Float64,Nothing} #7

@efmanu

Description

@efmanu

Hi,
If the data type of velocity is ReverseDiff.TrackedReal{Float64,Float64,Nothing}, I am getting error at line 38 of core.jl. The error is like below:

ERROR: MethodError: no method matching Int64(::ReverseDiff.TrackedReal{Float64,Float64,Nothing})
Closest candidates are:
  Int64(::T) where T<:Number at boot.jl:718
  Int64(::Union{Bool, Int32, Int64, UInt32, UInt64, UInt8, Int128, Int16, Int8, UInt128, UInt16}) at boot.jl:710
  Int64(::Ptr) at boot.jl:720
  ...
Stacktrace:
 [1] (::VoxelRayTracers.var"#2#4")(::ReverseDiff.TrackedReal{Float64,Float64,Nothing}) at C:\Users\manoos\.julia\packages\VoxelRayTracers\cUSqe\src\core.jl:38

I temporarly solved this problem by replacing Int(sign(v)) in line 38 of /src/core.jl with v > 0 ? 1 : -1 . Do you have any better suggestions? Moreover, can you update this package by solving the problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions