Skip to content

Commit 20b3b88

Browse files
authored
Update for DerivableInterfaces.jl v0.5 (#78)
1 parent 87840aa commit 20b3b88

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ITensorBase"
22
uuid = "4795dd04-0d67-49bb-8f44-b89c448a1dc7"
33
authors = ["ITensor developers <[email protected]> and contributors"]
4-
version = "0.2.7"
4+
version = "0.2.8"
55

66
[deps]
77
Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697"
@@ -27,7 +27,7 @@ ITensorBaseSparseArraysBaseExt = ["NamedDimsArrays", "SparseArraysBase"]
2727

2828
[compat]
2929
Accessors = "0.1.39"
30-
DerivableInterfaces = "0.4"
30+
DerivableInterfaces = "0.5"
3131
DiagonalArrays = "0.3"
3232
FillArrays = "1.13"
3333
GradedArrays = "0.4"

src/abstractitensor.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,11 @@ end
4646

4747
using DerivableInterfaces: @derive, @interface, AbstractArrayInterface
4848

49-
abstract type AbstractAllocatableArrayInterface <: AbstractArrayInterface end
50-
struct AllocatableArrayInterface <: AbstractAllocatableArrayInterface end
49+
abstract type AbstractAllocatableArrayInterface{N} <: AbstractArrayInterface{N} end
50+
struct AllocatableArrayInterface{N} <: AbstractAllocatableArrayInterface{N} end
51+
AllocatableArrayInterface{M}(::Val{N}) where {M,N} = AllocatableArrayInterface{N}()
52+
AllocatableArrayInterface(::Val{N}) where {N} = AllocatableArrayInterface{N}()
53+
AllocatableArrayInterface() = AllocatableArrayInterface{Any}()
5154

5255
unallocatable(a::AbstractITensor) = NamedDimsArray(a)
5356

0 commit comments

Comments
 (0)