Skip to content

JuliaSIMD/BitTwiddlingConvenienceFunctions.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BitTwiddlingConvenienceFunctions

Stable Dev Build Status Coverage

Useful for going to next/previous mask size, or calculating corresponding shifts:

julia> using BitTwiddlingConvenienceFunctions: prevpow2, nextpow2, intlog2

julia> prevpow2.(7:9)'
1×3 adjoint(::Vector{Int64}) with eltype Int64:
 4  8  8

julia> nextpow2.(7:9)'
1×3 adjoint(::Vector{Int64}) with eltype Int64:
 8  8  16

julia> intlog2.(7:9)' # truncated
1×3 adjoint(::Vector{Int64}) with eltype Int64:
 2  3  3

About

Bit twiddling convenience functions.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages