Skip to content

Commit

Permalink
Missed MPSMatrix constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
christiangnrd committed Apr 10, 2024
1 parent 343b57c commit 9b07eaa
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/mps/matrix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,8 @@ function MPSMatrix(arr::MtlArray{T,3}) where T
n_cols, n_rows, n_matrices = size(arr)
row_bytes = sizeof(T)*n_cols
desc = MPSMatrixDescriptor(n_rows, n_cols, n_matrices, row_bytes, row_bytes * n_rows, T)
mat = @objc [MPSMatrix alloc]::id{MPSMatrix}
obj = MPSMatrix(mat)
offset = arr.offset * sizeof(T)
finalizer(release, obj)
@objc [obj::id{MPSMatrix} initWithBuffer:arr::id{MTLBuffer}
offset:offset::NSUInteger
descriptor:desc::id{MPSMatrixDescriptor}]::id{MPSMatrix}
return obj
return MPSMatrix(arr, desc, offset)
end

#
Expand Down

0 comments on commit 9b07eaa

Please sign in to comment.