From c2df1ef875c23ad97a9b45ea752af2146313c620 Mon Sep 17 00:00:00 2001 From: Lukas Devos Date: Fri, 27 Feb 2026 11:49:05 -0500 Subject: [PATCH 1/3] add missing method for dealing with single integer --- src/implementation/allocator.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/implementation/allocator.jl b/src/implementation/allocator.jl index b62ac40..cacd7b3 100644 --- a/src/implementation/allocator.jl +++ b/src/implementation/allocator.jl @@ -258,6 +258,7 @@ end # how many bytes should be reserved allocation_size(::Type{T}, structure::Base.Dims) where {T} = prod(structure) * sizeof(T) +allocation_size(::Type{T}, structure::Int) where {T} = structure * sizeof(T) function tensoralloc( ::Type{A}, structure, ::Val{istemp}, buffer::BufferAllocator From 5ad32d67d7f3ce6b8fb528d2db0009ef50539277 Mon Sep 17 00:00:00 2001 From: Lukas Devos Date: Fri, 27 Feb 2026 11:49:23 -0500 Subject: [PATCH 2/3] bump v5.5.1 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 28cb8eb..71501ad 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "TensorOperations" uuid = "6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2" -version = "5.5.0" +version = "5.5.1" authors = ["Lukas Devos ", "Maarten Van Damme ", "Jutho Haegeman "] [deps] From a79eccfeefad1d457816affae5bf9b6b08181f4a Mon Sep 17 00:00:00 2001 From: Lukas Devos Date: Fri, 27 Feb 2026 11:51:04 -0500 Subject: [PATCH 3/3] make sure function is covered --- test/allocator.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/allocator.jl b/test/allocator.jl index b92f4fa..20c9e9d 100644 --- a/test/allocator.jl +++ b/test/allocator.jl @@ -59,9 +59,9 @@ using LinearAlgebra @test cp0 == 0 # Allocate some tensors - t1 = tensoralloc(Array{UInt8, 2}, (10, 10), Val(true), buffer) # should fit - @test t1 isa Array{UInt8, 2} - @test size(t1) == (10, 10) + t1 = tensoralloc(Vector{UInt8}, 100, Val(true), buffer) # should fit + @test t1 isa Vector{UInt8} + @test size(t1) == (100,) cp1 = allocator_checkpoint!(buffer) @test cp1 > cp0 # Verify pointer backing from buffer