Package com.aparapi.internal.writer
Class KernelWriter
java.lang.Object
com.aparapi.internal.writer.BlockWriter
com.aparapi.internal.writer.KernelWriter
public abstract class KernelWriter extends BlockWriter
-
Field Summary
Fields Modifier and Type Field Description static String
__constant
static String
__global
static String
__local
static String
__private
static String
CONSTANT_ANNOTATION_NAME
static Map<String,String>
javaToCLIdentifierMap
static String
LOCAL_ANNOTATION_NAME
Fields inherited from class com.aparapi.internal.writer.BlockWriter
arrayDimMangleSuffix, arrayLengthMangleSuffix, indent
-
Constructor Summary
Constructors Constructor Description KernelWriter()
-
Method Summary
Modifier and Type Method Description String
convertType(String _typeDesc, boolean useClassModel, boolean isLocal)
These three convert functions are here to perform any type conversion that may be required between Java and OpenCL.void
write(Entrypoint _entryPoint)
void
writeInstruction(Instruction _instruction)
void
writeMethod(InstructionSet.MethodCall _methodCall, ClassModel.ConstantPool.MethodEntry _methodEntry)
void
writePragma(String _name, boolean _enable)
void
writeThisRef()
static String
writeToString(Entrypoint _entrypoint)
Methods inherited from class com.aparapi.internal.writer.BlockWriter
convertCast, in, newLine, out, write, write, writeBlock, writeComposite, writeConditional, writeConditional, writeConditionalBranch16, writeln, writeMethodBody, writeSequence
-
Field Details
-
javaToCLIdentifierMap
-
__local
- See Also:
- Constant Field Values
-
__global
- See Also:
- Constant Field Values
-
__constant
- See Also:
- Constant Field Values
-
__private
- See Also:
- Constant Field Values
-
LOCAL_ANNOTATION_NAME
-
CONSTANT_ANNOTATION_NAME
-
-
Constructor Details
-
KernelWriter
public KernelWriter()
-
-
Method Details
-
convertType
These three convert functions are here to perform any type conversion that may be required between Java and OpenCL.- Overrides:
convertType
in classBlockWriter
- Parameters:
_typeDesc
- String in the Java JNI notation, [I, etc- Returns:
- Suitably converted string, "char*", etc
-
writeMethod
public void writeMethod(InstructionSet.MethodCall _methodCall, ClassModel.ConstantPool.MethodEntry _methodEntry) throws CodeGenException- Overrides:
writeMethod
in classBlockWriter
- Throws:
CodeGenException
-
writePragma
-
write
- Specified by:
write
in classBlockWriter
- Throws:
CodeGenException
-
writeThisRef
public void writeThisRef()- Overrides:
writeThisRef
in classBlockWriter
-
writeInstruction
- Overrides:
writeInstruction
in classBlockWriter
- Throws:
CodeGenException
-
writeToString
- Throws:
CodeGenException
-