public abstract class KernelWriter extends BlockWriter
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
__constant |
static java.lang.String |
__global |
static java.lang.String |
__local |
static java.lang.String |
CONSTANT_ANNOTATION_NAME |
static java.util.Map<java.lang.String,java.lang.String> |
javaToCLIdentifierMap |
static java.lang.String |
LOCAL_ANNOTATION_NAME |
arrayLengthMangleSuffix, indent
Constructor and Description |
---|
KernelWriter() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
convertType(java.lang.String _typeDesc,
boolean useClassModel)
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(java.lang.String _name,
boolean _enable) |
void |
writeThisRef() |
static java.lang.String |
writeToString(Entrypoint _entrypoint) |
convertCast, in, newLine, out, write, write, writeBlock, writeComposite, writeConditional, writeConditional, writeConditionalBranch16, writeln, writeMethodBody, writeSequence
public static final java.util.Map<java.lang.String,java.lang.String> javaToCLIdentifierMap
public static final java.lang.String __local
public static final java.lang.String __global
public static final java.lang.String __constant
public static final java.lang.String LOCAL_ANNOTATION_NAME
public static final java.lang.String CONSTANT_ANNOTATION_NAME
public java.lang.String convertType(java.lang.String _typeDesc, boolean useClassModel)
convertType
in class BlockWriter
_typeDesc
- String in the Java JNI notation, [I, etcpublic void writeMethod(InstructionSet.MethodCall _methodCall, ClassModel.ConstantPool.MethodEntry _methodEntry) throws CodeGenException
writeMethod
in class BlockWriter
CodeGenException
public void writePragma(java.lang.String _name, boolean _enable)
public void write(Entrypoint _entryPoint) throws CodeGenException
write
in class BlockWriter
CodeGenException
public void writeThisRef()
writeThisRef
in class BlockWriter
public void writeInstruction(Instruction _instruction) throws CodeGenException
writeInstruction
in class BlockWriter
CodeGenException
public static java.lang.String writeToString(Entrypoint _entrypoint) throws CodeGenException
CodeGenException