Skip to content

Commit

Permalink
Remove old struct and enum definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
christiangnrd committed Dec 10, 2024
1 parent 82bc3f8 commit 0547438
Show file tree
Hide file tree
Showing 19 changed files with 10 additions and 701 deletions.
7 changes: 0 additions & 7 deletions lib/mps/copy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@

export MPSMatrixCopyDescriptor

# struct MPSMatrixCopyOffsets
# sourceRowOffset::Cuint
# sourceColumnOffset::Cuint
# destinationRowOffset::Cuint
# destinationColumnOffset::Cuint
# end

@objcwrapper MPSMatrixCopyDescriptor <: NSObject

function MPSMatrixCopyDescriptor(sourceMatrix, destinationMatrix, offsets = MPSMatrixCopyOffsets(Cuint(0), Cuint(0), Cuint(0), Cuint(0)))
Expand Down
8 changes: 0 additions & 8 deletions lib/mps/decomposition.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# @cenum MPSMatrixDecompositionStatus::Cint begin
# MPSMatrixDecompositionStatusSuccess = 0
# MPSMatrixDecompositionStatusFailure = -1
# MPSMatrixDecompositionStatusSingular = -2
# MPSMatrixDecompositionStatusNonPositiveDefinite = -3
# end


## lu

export MPSMatrixDecompositionLU, encode!
Expand Down
8 changes: 0 additions & 8 deletions lib/mps/images.jl
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
## kernels

# @cenum MPSImageEdgeMode::NSUInteger begin
# MPSImageEdgeModeZero = 0
# MPSImageEdgeModeClamp = 1
# MPSImageEdgeModeMirror = 2
# MPSImageEdgeModeMirrorWithEdge = 3
# MPSImageEdgeModeConstant = 4
# end

@objcwrapper immutable=false MPSUnaryImageKernel <: MPSKernel

@objcproperties MPSUnaryImageKernel begin
Expand Down
10 changes: 0 additions & 10 deletions lib/mps/kernel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,6 @@
# kernels
#

# @cenum MPSKernelOptions::NSUInteger begin
# MPSKernelOptionsNone = 0
# MPSKernelOptionsSkipAPIValidation = 1 << 0
# MPSKernelOptionsAllowReducedPrecision = 1 << 1
# MPSKernelOptionsDisableInternalTiling = 1 << 2
# MPSKernelOptionsInsertDebugGroups = 1 << 3
# MPSKernelOptionsVerbose = 1 << 4
# end


@objcwrapper MPSKernel <: NSObject

@objcproperties MPSKernel begin
Expand Down
40 changes: 2 additions & 38 deletions lib/mps/matrix.jl
Original file line number Diff line number Diff line change
@@ -1,41 +1,5 @@
## enums

# @cenum MPSDataTypeBits::UInt32 begin
# MPSDataTypeFloatBit = UInt32(0x10000000)
# MPSDataTypeComplexBit = UInt32(0x01000000)
# MPSDataTypeSignedBit = UInt32(0x20000000)
# MPSDataTypeIntBit = UInt32(0x20000000)
# MPSDataTypeAlternateEncodingBit = UInt32(0x80000000)
# MPSDataTypeNormalizedBit = UInt32(0x40000000)
# end

# @cenum MPSDataType::UInt32 begin
# MPSDataTypeInvalid = UInt32(0)

# MPSDataTypeFloat32 = MPSDataTypeFloatBit | UInt32(32)
# MPSDataTypeFloat16 = MPSDataTypeFloatBit | UInt32(16)

# MPSDataTypeComplexFloat32 = MPSDataTypeFloatBit | MPSDataTypeComplexBit | UInt32(64)
# MPSDataTypeComplexFloat16 = MPSDataTypeFloatBit | MPSDataTypeComplexBit | UInt32(32)

# MPSDataTypeInt4 = MPSDataTypeSignedBit | UInt32(4)
# MPSDataTypeInt8 = MPSDataTypeSignedBit | UInt32(8)
# MPSDataTypeInt16 = MPSDataTypeSignedBit | UInt32(16)
# MPSDataTypeInt32 = MPSDataTypeSignedBit | UInt32(32)
# MPSDataTypeInt64 = MPSDataTypeSignedBit | UInt32(64)

# MPSDataTypeUInt4 = UInt32(4)
# MPSDataTypeUInt8 = UInt32(8)
# MPSDataTypeUInt16 = UInt32(16)
# MPSDataTypeUInt32 = UInt32(32)
# MPSDataTypeUInt64 = UInt32(64)

# MPSDataTypeBool = MPSDataTypeAlternateEncodingBit | UInt32(8)
# MPSDataTypeBFloat16 = MPSDataTypeAlternateEncodingBit | MPSDataTypeFloatBit | UInt32(16)

# MPSDataTypeUnorm1 = MPSDataTypeNormalizedBit | UInt32(1)
# MPSDataTypeUnorm8 = MPSDataTypeNormalizedBit | UInt32(8)
# end
## Some extra definitions for MPSDataType defined in libmps.jl

## bitwise operations lose type information, so allow conversions
Base.convert(::Type{MPSDataType}, x::Integer) = MPSDataType(x)

Expand Down
6 changes: 0 additions & 6 deletions lib/mps/matrixrandom.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# @cenum MPSMatrixRandomDistribution::UInt begin
# MPSMatrixRandomDistributionDefault = 1
# MPSMatrixRandomDistributionUniform = 2
# MPSMatrixRandomDistributionNormal = 3
# end

#
# matrix random descriptor
#
Expand Down
31 changes: 3 additions & 28 deletions lib/mps/size.jl
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
## size

export MPSSize

# struct MPSSize
# width::Float64
# height::Float64
# depth::Float64
## size

# MPSSize(w=1.0, h=1.0, d=1.0) = new(w, h, d)
# end
export MPSSize # (defined in libmps.jl)

# convenience constructors from tuple inputs
MPSSize(dims::NTuple{1,<:Real}) = MPSSize(dims[1], 1.0, 1.0)
Expand All @@ -18,22 +11,4 @@ MPSSize(dims::NTuple{3,<:Real}) = MPSSize(dims[1], dims[2], dims[3])

## origin

export MPSOrigin

# struct MPSOrigin
# x::Float64
# y::Float64
# z::Float64

# MPSOrigin(x=0, y=0, z=0) = new(x, y, z)
# end

## Offset

# struct MPSOffset
# x::NSInteger
# y::NSInteger
# z::NSInteger

# MPSOffset(x=0, y=0, z=0) = new(x, y, z)
# end
export MPSOrigin # (defined in libmps.jl)
1 change: 0 additions & 1 deletion lib/mtl/MTL.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ include("storage_type.jl")
include("compile-opts.jl")
include("library.jl")
include("function.jl")
include("argument.jl")
include("events.jl")
include("fences.jl")
include("heap.jl")
Expand Down
214 changes: 0 additions & 214 deletions lib/mtl/argument.jl

This file was deleted.

Loading

0 comments on commit 0547438

Please sign in to comment.