Skip to content

Commit 2563fba

Browse files
committed
Remove old @objcproperties declarations
1 parent b459511 commit 2563fba

24 files changed

+1
-419
lines changed

lib/mps/command_buf.jl

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,6 @@
66

77
# @objcwrapper MPSCommandBuffer <: MTLCommandBuffer
88

9-
# @objcproperties MPSCommandBuffer begin
10-
# # Identifying the Command Buffer
11-
# @autoproperty commandBuffer::id{MTLCommandBuffer}
12-
# # @autoproperty heapProvider::id{MPSHeapProvider}
13-
# # @autoproperty predicate::id{MPSPredicate}
14-
# @autoproperty rootCommandBuffer::id{MTLCommandBuffer}
15-
# end
16-
179
function MPSCommandBuffer(commandBuffer::MTLCommandBuffer)
1810
handle = @objc [MPSCommandBuffer commandBufferWithCommandBuffer:commandBuffer::id{MTLCommandBuffer}]::id{MPSCommandBuffer}
1911
MPSCommandBuffer(handle)

lib/mps/copy.jl

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@ export MPSMatrixCopy, encode!
1818

1919
# @objcwrapper immutable=false MPSMatrixCopy <: MPSKernel
2020

21-
# @objcproperties MPSMatrixCopy begin
22-
# @autoproperty copyRows::NSUInteger
23-
# @autoproperty copyColumns::NSUInteger
24-
# @autoproperty sourcesAreTransposed::Bool
25-
# @autoproperty destinationsAreTransposed::Bool
26-
# end
27-
2821
function MPSMatrixCopy(dev, copyRows, copyColumns, sourcesAreTransposed, destinationsAreTransposed)
2922
kernel = @objc [MPSMatrixCopy alloc]::id{MPSMatrixCopy}
3023
obj = MPSMatrixCopy(kernel)

lib/mps/images.jl

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22

33
# @objcwrapper immutable=false MPSUnaryImageKernel <: MPSKernel
44

5-
# @objcproperties MPSUnaryImageKernel begin
6-
# @autoproperty offset::MPSOffset
7-
# @autoproperty clipRect::MTLRegion
8-
# @autoproperty edgeMode::MPSImageEdgeMode setter=setEdgeMode
9-
# end
10-
115
function encode!(cmdbuf::MTLCommandBuffer, kernel::K, sourceTexture::MTLTexture, destinationTexture::MTLTexture) where {K<:MPSUnaryImageKernel}
126
@objc [kernel::id{K} encodeToCommandBuffer:cmdbuf::id{MTLCommandBuffer}
137
sourceTexture:sourceTexture::id{MTLTexture}
@@ -23,15 +17,6 @@ end
2317

2418
# @objcwrapper immutable=false MPSBinaryImageKernel <: MPSKernel
2519

26-
# @objcproperties MPSBinaryImageKernel begin
27-
# @autoproperty primaryOffset::MPSOffset
28-
# @autoproperty secondaryOffset::MPSOffset
29-
# @autoproperty primaryEdgeMode::MPSImageEdgeMode
30-
# @autoproperty secondaryEdgeMode::MPSImageEdgeMode
31-
# @autoproperty clipRect::MTLRegion
32-
# end
33-
34-
3520
## gaussian blur
3621

3722
export MPSImageGaussianBlur, encode!

lib/mps/kernel.jl

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,11 @@
44

55
# @objcwrapper MPSKernel <: NSObject
66

7-
# @objcproperties MPSKernel begin
8-
# @autoproperty options::MPSKernelOptions setter=setOptions
9-
# @autoproperty device::id{MTLDevice}
10-
# @autoproperty label::id{NSString} setter=setLabel
11-
# end
12-
137
@autoreleasepool function Base.copy(kernel::K) where {K <: MPSKernel}
148
obj = @objc [kernel::MPSKernel copy]::id{MPSKernel}
159
K(reinterpret(id{K}, obj))
1610
end
1711

1812
# @objcwrapper immutable=false MPSMatrixUnaryKernel <: MPSKernel
1913

20-
# @objcproperties MPSMatrixUnaryKernel begin
21-
# @autoproperty sourceMatrixOrigin::id{MTLOrigin} setter=setSourceMatrixOrigin
22-
# @autoproperty resultMatrixOrigin::id{MTLOrigin} setter=setResultMatrixOrigin
23-
# @autoproperty batchStart::NSUInteger setter=setBatchStart
24-
# @autoproperty batchSize::NSUInteger setter=setBatchSize
25-
# end
26-
2714
# @objcwrapper immutable=false MPSMatrixBinaryKernel <: MPSKernel
28-
29-
# @objcproperties MPSMatrixBinaryKernel begin
30-
# @autoproperty primarySourceMatrixOrigin::id{MTLOrigin} setter=setPrimarySourceMatrixOrigin
31-
# @autoproperty secondarySourceMatrixOrigin::id{MTLOrigin} setter=setSecondarySourceMatrixOrigin
32-
# @autoproperty resultMatrixOrigin::id{MTLOrigin} setter=setResultMatrixOrigin
33-
# @autoproperty batchStart::NSUInteger setter=setBatchStart
34-
# @autoproperty batchSize::NSUInteger setter=setBatchSize
35-
# end

lib/mps/matrix.jl

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,6 @@ export MPSMatrixDescriptor
2525

2626
# @objcwrapper MPSMatrixDescriptor <: NSObject
2727

28-
# @objcproperties MPSMatrixDescriptor begin
29-
# @autoproperty rows::NSUInteger setter=setRows
30-
# @autoproperty columns::NSUInteger setter=setColumns
31-
# @autoproperty matrices::NSUInteger
32-
# @autoproperty dataType::MPSDataType setter=setDataType
33-
# @autoproperty rowBytes::NSUInteger setter=setRowBytes
34-
# @autoproperty matrixBytes::NSUInteger
35-
# end
36-
3728
function MPSMatrixDescriptor(rows, columns, rowBytes, dataType)
3829
desc = @objc [MPSMatrixDescriptor matrixDescriptorWithRows:rows::NSUInteger
3930
columns:columns::NSUInteger
@@ -59,18 +50,6 @@ export MPSMatrix
5950

6051
# @objcwrapper immutable=false MPSMatrix <: NSObject
6152

62-
# @objcproperties MPSMatrix begin
63-
# @autoproperty device::id{MTLDevice}
64-
# @autoproperty rows::NSUInteger
65-
# @autoproperty columns::NSUInteger
66-
# @autoproperty matrices::NSUInteger
67-
# @autoproperty dataType::MPSDataType
68-
# @autoproperty rowBytes::NSUInteger
69-
# @autoproperty matrixBytes::NSUInteger
70-
# @autoproperty offset::NSUInteger
71-
# @autoproperty data::id{MTLBuffer}
72-
# end
73-
7453
function MPSMatrix(buf, descriptor::MPSMatrixDescriptor, offset::Integer=0)
7554
mat = @objc [MPSMatrix alloc]::id{MPSMatrix}
7655
obj = MPSMatrix(mat)
@@ -143,14 +122,6 @@ export MPSMatrixMultiplication, encode!, matmul!
143122

144123
# @objcwrapper immutable=false MPSMatrixMultiplication <: MPSKernel
145124

146-
# @objcproperties MPSMatrixMultiplication begin
147-
# @autoproperty leftMatrixOrigin::MTLOrigin setter=setLeftMatrixOrigin
148-
# @autoproperty rightMatrixOrigin::MTLOrigin setter=setRightMatrixOrigin
149-
# @autoproperty resultMatrixOrigin::MTLOrigin setter=setResultMatrixOrigin
150-
# @autoproperty batchSize::NSUInteger setter=setBatchSize
151-
# @autoproperty batchStart::NSUInteger setter=setBatchStart
152-
# end
153-
154125
function MPSMatrixMultiplication(dev, transposeLeft, transposeRight, resultRows,
155126
resultColumns, interiorColumns, alpha, beta)
156127
kernel = @objc [MPSMatrixMultiplication alloc]::id{MPSMatrixMultiplication}
@@ -218,13 +189,6 @@ export MPSMatrixFindTopK, encode!
218189

219190
# @objcwrapper immutable=false MPSMatrixFindTopK <: MPSMatrixUnaryKernel
220191

221-
# @objcproperties MPSMatrixFindTopK begin
222-
# @autoproperty indexOffset::NSInteger setter=setIndexOffset
223-
# @autoproperty numberOfTopKValues::NSInteger
224-
# @autoproperty sourceColumns::NSInteger setter=setSourceColumns
225-
# @autoproperty sourceRows::NSInteger setter=setSourceRows
226-
# end
227-
228192
function MPSMatrixFindTopK(dev, numberOfTopKValues)
229193
kernel = @objc [MPSMatrixFindTopK alloc]::id{MPSMatrixFindTopK}
230194
obj = MPSMatrixFindTopK(kernel)
@@ -316,11 +280,6 @@ export MPSMatrixSoftMax, MPSMatrixLogSoftMax, encode!
316280
# @objcwrapper immutable=false MPSMatrixSoftMax <: MPSMatrixUnaryKernel
317281
# @objcwrapper immutable=false MPSMatrixLogSoftMax <: MPSMatrixSoftMax
318282

319-
# @objcproperties MPSMatrixSoftMax begin
320-
# @autoproperty sourceRows::NSInteger setter=setSourceRows
321-
# @autoproperty sourceColumns::NSInteger setter=setSourceColumns
322-
# end
323-
324283
for f in (:MPSMatrixSoftMax, :MPSMatrixLogSoftMax)
325284
@eval begin
326285
function $(f)(dev)

lib/mps/matrixrandom.jl

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,6 @@ export MPSMatrixRandomDistributionDescriptor
66

77
# @objcwrapper immutable=false MPSMatrixRandomDistributionDescriptor <: NSObject
88

9-
# @objcproperties MPSMatrixRandomDistributionDescriptor begin
10-
# @autoproperty distributionType::MPSMatrixRandomDistribution
11-
# @autoproperty maximum::Float32 setter=setMaximum
12-
# @autoproperty mean::Float32 setter=setMean
13-
# @autoproperty minimum::Float32 setter=setMinimum
14-
# @autoproperty standardDeviation::Float32 setter=setStandardDeviation
15-
# end
16-
17-
189
function MPSMatrixRandomDefaultDistributionDescriptor()
1910
desc = @objc [MPSMatrixRandomDistributionDescriptor defaultDistributionDescriptor]::id{MPSMatrixRandomDistributionDescriptor}
2011
obj = MPSMatrixRandomDistributionDescriptor(desc)
@@ -49,13 +40,6 @@ end
4940

5041
# @objcwrapper immutable=false MPSMatrixRandom <: MPSKernel
5142

52-
# @objcproperties MPSMatrixRandom begin
53-
# @autoproperty batchSize::NSUInteger
54-
# @autoproperty batchStart::NSUInteger
55-
# @autoproperty destinationDataType::id{MPSDataType}
56-
# @autoproperty distributionType::id{MPSMatrixRandomDistributionDescriptor}
57-
# end
58-
5943
function encode!(cmdbuf::MTLCommandBuffer, kernel::K, destinationMatrix::MPSMatrix) where {K<:MPSMatrixRandom}
6044
@objc [kernel::id{K} encodeToCommandBuffer:cmdbuf::id{MTLCommandBuffer}
6145
destinationMatrix:destinationMatrix::id{MPSMatrix}]::Nothing

lib/mps/ndarray.jl

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,6 @@ export MPSNDArrayDescriptor
66

77
# @objcwrapper immutable=false MPSNDArrayDescriptor <: NSObject
88

9-
# @objcproperties MPSNDArrayDescriptor begin
10-
# @autoproperty dataType::MPSDataType setter=setDataType
11-
# @autoproperty numberOfDimensions::NSUInteger setter=setNumberOfDimensions
12-
13-
# # Both are officially available starting macOS 15, but they work in macOS 13/14
14-
# @autoproperty preferPackedRows::Bool setter=setPreferPackedRows # macOS 15+
15-
# @autoproperty getShape::id{NSArray} # macOS 15+
16-
# end
17-
189
function MPSNDArrayDescriptor(dataType::DataType, dimensionCount, dimensionSizes::Ptr)
1910
desc = @objc [MPSNDArrayDescriptor descriptorWithDataType:dataType::MPSDataType
2011
dimensionCount:dimensionCount::NSUInteger
@@ -49,22 +40,6 @@ export MPSNDArray
4940

5041
# @objcwrapper immutable=false MPSNDArray <: NSObject
5142

52-
# @objcproperties MPSNDArray begin
53-
# @autoproperty dataType::MPSDataType
54-
# @autoproperty dataTypeSize::Csize_t
55-
# @autoproperty device::id{MTLDevice}
56-
# @autoproperty label::id{NSString} setter = setLabel
57-
# @autoproperty numberOfDimensions::NSUInteger
58-
# @autoproperty parent::id{MPSNDArray}
59-
60-
# #Instance methods that act like properties
61-
# @static if Metal.is_macos(v"15")
62-
# @autoproperty descriptor::id{MPSNDArrayDescriptor}
63-
# @autoproperty resourceSize::NSUInteger
64-
# @autoproperty userBuffer::id{MTLBuffer}
65-
# end
66-
# end
67-
6843
@static if Metal.is_macos(v"15")
6944
function userBuffer(ndarr::MPSNDArray)::Union{Nothing, MTLBuffer}
7045
res = @objc [ndarr::id{MPSNDArray} userBuffer]::id{MTLBuffer}
@@ -86,10 +61,6 @@ end
8661

8762
# @objcwrapper immutable=false MPSTemporaryNDArray <: MPSNDArray
8863

89-
# @objcproperties MPSTemporaryNDArray begin
90-
# @autoproperty readCount::NSUInteger setter=setReadCount
91-
# end
92-
9364
function MPSTemporaryNDArray(cmdbuf::MTLCommandBuffer, descriptor::MPSNDArrayDescriptor)
9465
@objc [MPSTemporaryNDArray temporaryNDArrayWithCommandBuffer:cmdbuf::id{MTLCommandBuffer}
9566
descriptor:descriptor::id{MPSNDArrayDescriptor}]::id{MPSTemporaryNDArray}
@@ -322,11 +293,6 @@ end
322293

323294
# @objcwrapper immutable=false MPSNDArrayMatrixMultiplication <: MPSNDArrayMultiaryKernel
324295

325-
# @objcproperties MPSNDArrayMatrixMultiplication begin
326-
# @autoproperty alpha::Float64 setter=setAlpha
327-
# @autoproperty beta::Float64 setter=setBeta
328-
# end
329-
330296
function MPSNDArrayMatrixMultiplication(device, sourceCount)
331297
kernel = @objc [MPSNDArrayMatrixMultiplication alloc]::id{MPSNDArrayMatrixMultiplication}
332298
obj = MPSNDArrayMatrixMultiplication(kernel)

lib/mps/vector.jl

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@ export MPSVectorDescriptor
44

55
# @objcwrapper MPSVectorDescriptor <: NSObject
66

7-
# @objcproperties MPSVectorDescriptor begin
8-
# @autoproperty length::NSUInteger setter=setLength
9-
# @autoproperty vectors::NSUInteger
10-
# @autoproperty dataType::MPSDataType setter=setDataType
11-
# @autoproperty vectorBytes::NSUInteger
12-
# end
13-
147

158
function MPSVectorDescriptor(length::Integer, dataType::Union{DataType,MPSDataType})
169
desc = @objc [MPSVectorDescriptor vectorDescriptorWithLength:length::NSUInteger
@@ -34,16 +27,6 @@ export MPSVector
3427

3528
# @objcwrapper immutable=false MPSVector <: NSObject
3629

37-
# @objcproperties MPSVector begin
38-
# @autoproperty device::id{MTLDevice}
39-
# @autoproperty length::NSUInteger
40-
# @autoproperty vectors::NSUInteger
41-
# @autoproperty dataType::MPSDataType
42-
# @autoproperty vectorBytes::NSUInteger
43-
# @autoproperty offset::NSUInteger
44-
# @autoproperty data::id{MTLBuffer}
45-
# end
46-
4730
function MPSVector(buf, descriptor::MPSVectorDescriptor, offset::Integer=0)
4831
vec = @objc [MPSVector alloc]::id{MPSVector}
4932
obj = MPSVector(vec)

lib/mtl/binary_archive.jl

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ export MTLBinaryArchiveDescriptor
66

77
# @objcwrapper immutable=false MTLBinaryArchiveDescriptor <: NSObject
88

9-
# @objcproperties MTLBinaryArchiveDescriptor begin
10-
# # Choosing an Archive File
11-
# @autoproperty url::id{NSURL} setter=setUrl
12-
# end
13-
149
function MTLBinaryArchiveDescriptor()
1510
handle = @objc [MTLBinaryArchiveDescriptor new]::id{MTLBinaryArchiveDescriptor}
1611
obj = MTLBinaryArchiveDescriptor(handle)
@@ -27,12 +22,6 @@ export MTLBinaryArchive, add_functions!
2722

2823
# @objcwrapper immutable=false MTLBinaryArchive <: NSObject
2924

30-
# @objcproperties MTLBinaryArchive begin
31-
# # Identifying the Archive
32-
# @autoproperty label::id{NSString} setter=setLabel
33-
# @autoproperty device::id{MTLDevice}
34-
# end
35-
3625
function MTLBinaryArchive(dev::MTLDevice, desc::MTLBinaryArchiveDescriptor)
3726
err = Ref{id{NSError}}(nil)
3827
handle = @objc [dev::id{MTLDevice} newBinaryArchiveWithDescriptor:desc::id{MTLBinaryArchiveDescriptor}

lib/mtl/buffer.jl

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,6 @@ export MTLBuffer, contents
55

66
# @objcwrapper MTLBuffer <: MTLResource
77

8-
# @objcproperties MTLBuffer begin
9-
# @autoproperty length::NSUInteger # In bytes
10-
# @autoproperty device::id{MTLDevice}
11-
# @autoproperty contents::Ptr{Cvoid}
12-
# @autoproperty remoteStorageBuffer::id{MTLBuffer}
13-
# @autoproperty gpuAddress::UInt64 type=Ptr{Cvoid}
14-
# end
15-
168
Base.sizeof(buf::MTLBuffer) = Int(buf.length)
179

1810
contents(buf::MTLBuffer) = @objc [buf::id{MTLBuffer} contents]::Ptr{Cvoid}

0 commit comments

Comments
 (0)