-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMetalBridge.m
27 lines (25 loc) · 1.06 KB
/
MetalBridge.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//
// MetalBridge.m
// fgrain_metal
//
// Created by yuygfgg on 2024/10/16.
//
// MetalBridge.m
#import "fgrain_metal-Bridging-Header.h"
#import "fgrain_metal-Swift.h"
void runMetalComputationBridge(float* inputData, float* outputData, int width, int height,
int stride,
int numIterations, float grainRadiusMean, float grainRadiusStd,
float sigma, int32_t seed) {
MetalComputeBridge *bridge = [[MetalComputeBridge alloc] init];
[bridge runMetalComputationWithInputData:inputData
outputData:outputData
width:width
height:height
stride:stride
numIterations:numIterations
grainRadiusMean:grainRadiusMean
grainRadiusStd:grainRadiusStd
sigma:sigma
seed:seed];
}