@specs-feup/clava
Version:
A C/C++ source-to-source compiler written in Typescript
48 lines • 1.5 kB
TypeScript
import { Call } from "../../Joinpoints.js";
export interface OpenClKernelReplacerConfiguration {
kernelName: string;
kernelFile: string;
bufferSizes: Record<string, string>;
localSize: string[] | string;
iterNumbers: string[] | string;
outputBuffers: string[];
}
export default class KernelReplacer {
private call;
private function;
private stmt;
private file;
private bufferSizes;
private inBuffers;
private outBuffers;
private inOutBuffers;
private kernelCode;
private kernelName;
private deviceType;
private errorHandling;
private localSize;
private iter;
constructor($call: Call, kernelName: string, kernelCodePath: string, bufferSizes: Record<string, string>, localSize: string[] | string, numIters: string[] | string);
setOutput(paramName: string): void;
replaceCall(): void;
private makeKernelCode;
private makeCode;
private makeGlobalSizeCode;
private makeOutputBuffersCode;
private makeArgBindCode;
private makeBuffersCode;
private makeErrorHandlingCode;
private makeInBuffers;
private getBufferSize;
private getBaseType;
private static SetupCode;
private static ExceptionCode;
private static BufferCopyOut;
private static EnqueueKernel;
private static SizesDecl;
private static ArgBind;
private static KernelCreation;
private static BufferDecl;
private static BufferCopyIn;
}
//# sourceMappingURL=KernelReplacer.d.ts.map