Package com.aparapi.examples.median
Class MedianKernel7x7
java.lang.Object
com.aparapi.Kernel
com.aparapi.examples.median.MedianKernel7x7
- All Implemented Interfaces:
Cloneable
public class MedianKernel7x7
extends com.aparapi.Kernel
Provides support for pixel windows of size no greater than 49 (e.g. 7x7).
Demonstrates use of __private array for (partial) sorting, also demonstrates @NoCl annotation for specialised use of ThreadLocal in JTP execution.
-
Nested Class Summary
-
Field Summary
Fields Modifier and Type Field Description static int
CHANNEL_ALPHA
static int
CHANNEL_BLUE
static int
CHANNEL_GRAY
static int
CHANNEL_GREEN
static int
CHANNEL_RED
static int
MAX_WINDOW_SIZE
-
Constructor Summary
Constructors Constructor Description MedianKernel7x7()
-
Method Summary
Modifier and Type Method Description void
processImages(MedianSettings settings)
void
run()
void
setUpWindow()
Methods inherited from class com.aparapi.Kernel
addExecutionModes, cancelMultiPass, cleanUpArrays, clone, dispose, execute, execute, execute, execute, execute, execute, executeFallbackAlgorithm, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, getAccumulatedExecutionTime, getAccumulatedExecutionTimeAllThreads, getAccumulatedExecutionTimeCurrentThread, getCancelState, getConversionTime, getCurrentPass, getExecutionMode, getExecutionTime, getKernelState, getMappedMethodName, getProfileInfo, getProfileReportCurrentThread, getProfileReportLastThread, getTargetDevice, hasFallbackAlgorithm, hasNextExecutionMode, invalidateCaches, isAllowDevice, isAutoCleanUpArrays, isExecuting, isExplicit, isMappedMethod, isOpenCLDelegateMethod, isRunningCL, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, registerProfileReportObserver, setAutoCleanUpArrays, setExecutionMode, setExecutionModeWithoutFallback, setExplicit, setFallbackExecutionMode, toString, tryNextExecutionMode, usesAtomic32, usesAtomic64
-
Field Details
-
CHANNEL_GRAY
public static final int CHANNEL_GRAY- See Also:
- Constant Field Values
-
CHANNEL_ALPHA
public static final int CHANNEL_ALPHA- See Also:
- Constant Field Values
-
CHANNEL_RED
public static final int CHANNEL_RED- See Also:
- Constant Field Values
-
CHANNEL_GREEN
public static final int CHANNEL_GREEN- See Also:
- Constant Field Values
-
CHANNEL_BLUE
public static final int CHANNEL_BLUE- See Also:
- Constant Field Values
-
MAX_WINDOW_SIZE
public static final int MAX_WINDOW_SIZE- See Also:
- Constant Field Values
-
-
Constructor Details
-
MedianKernel7x7
public MedianKernel7x7()
-
-
Method Details
-
setUpWindow
public void setUpWindow() -
processImages
-
run
public void run()- Specified by:
run
in classcom.aparapi.Kernel
-