I’d like to reinterpret a UInt64 as a SVector{8, UInt8}:
julia> reinterpret(SVector{8, UInt8}, UInt64(1235189))
ERROR: bitcast: target type not a leaf primitive type
Stacktrace:
[1] reinterpret(::Type{SArray{Tuple{8},UInt8,1,8}}, ::UInt64) at ./essentials.jl:381
[2] top-level scope at none:0
It’s not working the other way round either:
julia> reinterpret(UInt64, SVector{8, UInt8}(1,1,1,1,1,1,1,1))
Error showing value of type Base.ReinterpretArray{UInt64,1,UInt8,SArray{Tuple{8},UInt8,1,8}}:
ERROR: MethodError: no method matching SOneTo{8}(::UnitRange{Int64})
Is there something that I am missing?