Skip to content

Commit

Permalink
Add commented out Static code
Browse files Browse the repository at this point in the history
  • Loading branch information
chriselrod committed Aug 11, 2021
1 parent 1e3ffb5 commit bc0f5bd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/SIMDTypes.jl
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
module SIMDTypes

# using Static: StaticInt

struct Bit; data::Bool; end # Dummy for Ptr
# @inline Base.convert(::Type{Bool}, b::Bit) = getfield(b, :data)

const FloatingTypes = Union{Float16,Float32,Float64}
const SignedHW = Union{Int8,Int16,Int32,Int64}
const UnsignedHW = Union{UInt8,UInt16,UInt32,UInt64}
const IntegerTypesHW = Union{SignedHW,UnsignedHW}
# const IntegerTypes = Union{StaticInt,IntegerTypesHW}

const NativeTypesExceptBitandFloat16 = Union{Bool,Base.HWReal}
const NativeTypesExceptBit = Union{Bool,Base.HWReal,Float16}
Expand Down
3 changes: 3 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@ using Test
@test 1f0 isa SIMDTypes.NativeTypesExceptBitandFloat16

@test 1.3 isa SIMDTypes.FloatingTypes
# @test !(1.3 isa SIMDTypes.IntegerTypes)
@test !(1.3 isa SIMDTypes.IntegerTypesHW)
# @test 1 isa SIMDTypes.IntegerTypes
@test 1 isa SIMDTypes.SignedHW
@test !(1 isa SIMDTypes.UnsignedHW)
@test 1 isa SIMDTypes.IntegerTypesHW
# @test one(UInt) isa SIMDTypes.IntegerTypes
@test !(one(UInt) isa SIMDTypes.SignedHW)
@test one(UInt) isa SIMDTypes.UnsignedHW
@test one(UInt) isa SIMDTypes.IntegerTypesHW
Expand Down

2 comments on commit bc0f5bd

@chriselrod
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/42608

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.0 -m "<description of version>" bc0f5bd599d5281bed6e1fb32f8b980cce1d77d0
git push origin v0.1.0

Please sign in to comment.