Skip to content

goretkin/BitBlockArrays.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BitBlockArrays

Build Status Coverage Build Status Coverage Coverage

This package is completely undeveloped.

Extend Base.BitArray to include other bit-packing layouts. More "square" layouts gives me flexibility in choosing alignment, so that bitwise operations may be used.

julia> b = BitBlockArray(UInt64(0xF0F0F0FF0000FF00), 8, 8)
8×8 BitBlockArray{2,UInt64,(3, 3)}:
 0  1  0  0  1  0  0  0
 0  1  0  0  1  0  0  0
 0  1  0  0  1  0  0  0
 0  1  0  0  1  0  0  0
 0  1  0  0  1  1  1  1
 0  1  0  0  1  1  1  1
 0  1  0  0  1  1  1  1
 0  1  0  0  1  1  1  1

julia> bz = BitBlockArray(UInt64(0), 8, 8)
8×8 BitBlockArray{2,UInt64,(3, 3)}:
 0  0  0  0  0  0  0  0
 0  0  0  0  0  0  0  0
 0  0  0  0  0  0  0  0
 0  0  0  0  0  0  0  0
 0  0  0  0  0  0  0  0
 0  0  0  0  0  0  0  0
 0  0  0  0  0  0  0  0
 0  0  0  0  0  0  0  0

julia> uba = UniformBlockArray(fill(bz, 2, 2))
16×16 UniformBlockArray{Bool,2,Array{BitBlockArray{2,UInt64,(3, 3)},2}}:
  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0

julia> uba
16×16 UniformBlockArray{Bool,2,Array{BitBlockArray{2,UInt64,(3, 3)},2}}:
 0  1  0  0  1  0  0  0  0  0  0  0  0  0  0  0
 0  1  0  0  1  0  0  0  0  0  0  0  0  0  0  0
 0  1  0  0  1  0  0  0  0  0  0  0  0  0  0  0
 0  1  0  0  1  0  0  0  0  0  0  0  0  0  0  0
 0  1  0  0  1  1  1  1  0  0  0  0  0  0  0  0
 0  1  0  0  1  1  1  1  0  0  0  0  0  0  0  0
 0  1  0  0  1  1  1  1  0  0  0  0  0  0  0  0
 0  1  0  0  1  1  1  1  0  0  0  0  0  0  0  0
 0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
 0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
 0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
 0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
 0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
 0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
 0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
 0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0

related: https://github.com/JuliaLang/julia/blob/098ef24c7acb989cae2516ac18bff498e9a69554/base/bitarray.jl#L1692-L1717 https://github.com/JuliaLang/julia/blob/098ef24c7acb989cae2516ac18bff498e9a69554/base/multidimensional.jl#L1145-L1150

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages