-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move MPSKernels into a dedicated file
- Loading branch information
Showing
4 changed files
with
45 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# | ||
# 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 | ||
@autoproperty device::id{MTLDevice} | ||
@autoproperty label::id{NSString} setter=setLabel | ||
@autoproperty options::MPSKernelOptions setter=setOptions | ||
end | ||
|
||
|
||
@objcwrapper immutable=false MPSMatrixUnaryKernel <: MPSKernel | ||
|
||
@objcproperties MPSMatrixUnaryKernel begin | ||
@autoproperty sourceMatrixOrigin::id{MTLOrigin} setter=setSourceMatrixOrigin | ||
@autoproperty resultMatrixOrigin::id{MTLOrigin} setter=setResultMatrixOrigin | ||
@autoproperty batchStart::NSUInteger setter=setBatchStart | ||
@autoproperty batchSize::NSUInteger setter=setBatchSize | ||
end | ||
|
||
|
||
@objcwrapper immutable=false MPSMatrixBinaryKernel <: MPSKernel | ||
|
||
@objcproperties MPSMatrixUnaryKernel begin | ||
@autoproperty primarySourceMatrixOrigin::id{MTLOrigin} setter=setPrimarySourceMatrixOrigin | ||
@autoproperty secondarySourceMatrixOrigin::id{MTLOrigin} setter=setSecondarySourceMatrixOrigin | ||
@autoproperty resultMatrixOrigin::id{MTLOrigin} setter=setResultMatrixOrigin | ||
@autoproperty batchStart::NSUInteger setter=setBatchStart | ||
@autoproperty batchSize::NSUInteger setter=setBatchSize | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters