-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using Base.@pure
in ArrayInterface causes 265 problems
#115
Comments
In general, I agree that this should be avoided. |
This goes for |
FWIW, I posted an example on issue 265 where: sirs() = simd_integer_register_size()
getoffset() = 4sirs()*2 + 2
julia> using VectorizationBase
julia> VectorizationBase.has_feature(::Val{:x86_64_avx2}) = VectorizationBase.False()
julia> using VectorizedRNG
[ Info: Precompiling VectorizedRNG [33b4df10-0173-11e9-2a0c-851a7edac40e]
julia> VectorizedRNG.getoffset()
514
julia> @code_warntype VectorizedRNG.getoffset()
MethodInstance for VectorizedRNG.getoffset()
from getoffset() in VectorizedRNG at /home/chriselrod/.julia/dev/VectorizedRNG/src/xoshiro.jl:98
Arguments
#self#::Core.Const(VectorizedRNG.getoffset)
Body::Int64
1 ─ %1 = VectorizedRNG.sirs()::Core.Const(static(16))
│ %2 = (4 * %1)::Core.Const(64)
│ %3 = (%2 * 2)::Core.Const(128)
│ %4 = (%3 + 2)::Core.Const(130)
└── return %4
julia> VectorizedRNG.sirs()
static(16)
julia> VectorizedRNG.getoffset()
514 There was no At this point, I'm losing motivation to address the issue myself. |
If I can find some time today I'll take a look at this. Maybe an extra pair of eyes will catch something. |
Does this mean that |
There was none in between I'd like to get a reproducer free of any |
I think I solve a lot of the stuff I'm responsible for in #119. I'm also going to try to make more generated methods rely on @ChrisRackauckas , I'm not sure what to do about this line here. I think type names are mutable, but I'm also not sure in what context this would actually change. |
I think we want to force that one, otherwise yes it won't infer. This is something no one should ever be mutating? |
If we want to change it for the sake of not using @generated __parameterless_type(::Type{T}) where {T} = Base.typename(T).wrapper Of course, the same criticism of |
JuliaLang/julia#265 (comment)
I think we should err on the side of finding any other way.
The text was updated successfully, but these errors were encountered: