https://github.com/JuliaLang/julia
Revision b730778bd92fd4c531c382555d7889a0131fa940 authored by Andreas Noack on 18 October 2016, 20:49:55 UTC, committed by Tony Kelman on 22 February 2017, 13:30:36 UTC
(cherry picked from commit d0914f87c808fa234d91030c789d6f33a5330bc9)
1 parent d56fb3b
Raw File
Tip revision: b730778bd92fd4c531c382555d7889a0131fa940 authored by Andreas Noack on 18 October 2016, 20:49:55 UTC
Fix BLAS.syr/her! by checking stride of x (#18919)
Tip revision: b730778
nofloat_hashing.jl
# This file is a part of Julia. License is MIT: http://julialang.org/license

## hashing small, built-in numeric types
## for a system image built without floating point support

hx(a::UInt64, b::UInt64, h::UInt) = hash_uint64(3a + b - h)

hash(x::UInt64,  h::UInt) = hx(x, x, h)
hash(x::Int64,   h::UInt) = hx(reinterpret(UInt64,abs(x)), reinterpret(UInt64,x), h)
hash(x::Union{Bool,Char,Int8,UInt8,Int16,UInt16,Int32,UInt32}, h::UInt) = hash(Int64(x), h)
back to top