Type Method

kernelWithString:

Creates a warp kernel object from the specified kernel source code.

Declaration

+ (instancetype)kernelWithString:(NSString *)string;

Parameters

string

A program in the Core Image Kernel Language that contains a single routine marked using the kernel keyword.

Return Value

A new warp kernel object, or nil if the specified source code does not contain a valid warp kernel routine.

Discussion

This method is similar to the kernelWithString: method of the superclass CIKernel, but creates only warp kernels. Use this method when you want to ensure that the type of kernel object returned (if any) is always CIWarpKernel.