You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@generatedfunction_mask_bzhi(::Union{Val{W},StaticInt{W}}, l::I) where {W,I<:Integer}
350
+
@generatedfunction_mask_bzhi(::Union{Val{W},StaticInt{W}}, l::I) where {W,I<:Union{Integer,StaticInt}}
351
351
U =mask_type_symbol(W)
352
352
T = W >32?:UInt64::UInt32
353
353
quote
@@ -357,21 +357,21 @@ end
357
357
EVLMask{$W,$U}(bzhi(-1%$T, m) %$U, m)
358
358
end
359
359
end
360
-
# @inline function _mask_bzhi(::Union{Val{W},StaticInt{W}}, l::I) where {W,I<:Integer}
360
+
# @inline function _mask_bzhi(::Union{Val{W},StaticInt{W}}, l::I) where {W,I<:Union{Integer,StaticInt}}
361
361
# U = mask_type(StaticInt(W))
362
362
# # m = ((l) % UInt32) & ((W-1) % UInt32)
363
363
# m = valrem(StaticInt{W}(), l % UInt32)
364
364
# m = Core.ifelse((m % UInt8) == 0x00, W % UInt32, m)
365
365
# # m = Core.ifelse(zero(m) == m, -1 % UInt32, m)
366
366
# EVLMask{W,U}(bzhi(-1 % UInt32, m) % U, m)
367
367
# end
368
-
# @inline function _mask(::Union{Val{W},StaticInt{W}}, l::I, ::True) where {W,I<:Integer}
368
+
# @inline function _mask(::Union{Val{W},StaticInt{W}}, l::I, ::True) where {W,I<:Union{Integer,StaticInt}}
369
369
# U = mask_type(StaticInt(W))
370
370
# m = ((l-one(l)) % UInt32) & ((W-1) % UInt32)
371
371
# m += one(m)
372
372
# EVLMask{W,U}(bzhi(-1 % UInt32, m) % U, m)
373
373
# end
374
-
# @generated function _mask(::Union{Val{W},StaticInt{W}}, l::I, ::True) where {W,I<:Integer}
374
+
# @generated function _mask(::Union{Val{W},StaticInt{W}}, l::I, ::True) where {W,I<:Union{Integer,StaticInt}}
375
375
# M = mask_type_symbol(W)
376
376
# quote
377
377
# $(Expr(:meta,:inline))
@@ -426,16 +426,16 @@ end
426
426
l::I,
427
427
::StaticInt{RS},
428
428
::True,
429
-
) where {W,RS,I<:Integer} =mask_cmp_quote(W, RS, true)
429
+
) where {W,RS,I<:Union{Integer,StaticInt}} =mask_cmp_quote(W, RS, true)
430
430
@generated_mask_cmp(
431
431
::Union{Val{W},StaticInt{W}},
432
432
l::I,
433
433
::StaticInt{RS},
434
434
::False,
435
-
) where {W,RS,I<:Integer} =mask_cmp_quote(W, RS, false)
436
-
@generated_mask(::Union{Val{W},StaticInt{W}}, l::I, ::True) where {W,I<:Integer} =
435
+
) where {W,RS,I<:Union{Integer,StaticInt}} =mask_cmp_quote(W, RS, false)
436
+
@generated_mask(::Union{Val{W},StaticInt{W}}, l::I, ::True) where {W,I<:Union{Integer,StaticInt}} =
437
437
mask_shift_quote(W, true)
438
-
@generatedfunction_mask(::Union{Val{W},StaticInt{W}}, l::I, ::False) where {W,I<:Integer}
438
+
@generatedfunction_mask(::Union{Val{W},StaticInt{W}}, l::I, ::False) where {W,I<:Union{Integer,StaticInt}}
439
439
# Otherwise, it's probably more efficient to use a comparison, as this will probably create some type that can be used directly for masked moves/blends/etc
0 commit comments