From 67ff77bb03247425a28a719a2641c9757b0657c5 Mon Sep 17 00:00:00 2001 From: Pedro Boechat Date: Mon, 1 Apr 2024 18:21:21 -0300 Subject: [PATCH] Fix type size gather --- src/model/model.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/model/model.jl b/src/model/model.jl index 14b8770..519db33 100644 --- a/src/model/model.jl +++ b/src/model/model.jl @@ -29,7 +29,7 @@ struct WNN{S<:Any,T<:WNNINT} error("Values for 'd' and 'n' must be positive") end - if T !== BigInt && d > (T.size * 8) + if T !== BigInt && d > (sizeof(T) * 8) error("'$T' is insufficient to provide 'd' addressing bits") end @@ -72,7 +72,7 @@ end Base.show(io::IO, wnn::WNN{S,T}) where {S<:Any,T<:BigInt} = print(io, "WNN[∞ bits, $(wnn.d) × $(wnn.n)]") Base.show(io::IO, wnn::WNN{S,T}) where {S<:Any,T<:Unsigned} = - print(io, "WNN[$(T.size * 8) bits, $(wnn.d) × $(wnn.n)]") + print(io, "WNN[$(sizeof(T) * 8) bits, $(wnn.d) × $(wnn.n)]") Base.Broadcast.broadcastable(wnn::WNN) = Ref(wnn)