Package com.aparapi.internal.writer
Class KernelWriter
java.lang.Object
com.aparapi.internal.writer.BlockWriter
com.aparapi.internal.writer.KernelWriter
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprivate final Stringprivate final Stringprivate final Stringprivate final Stringprivate final Stringprivate final Stringprivate final Stringprivate final Stringprivate final Stringprivate final Stringprivate final Stringprivate final Stringprivate final Stringprivate final Stringprivate final Stringprivate final Stringprivate final Stringprivate final Stringprivate final Stringprivate Entrypointprivate static final booleanWhen declaring a __private struct pointer field, we always omit the "__private" qualifier.static final StringFields inherited from class com.aparapi.internal.writer.BlockWriter
arrayDimMangleSuffix, arrayLengthMangleSuffix, indent -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertType(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.private booleanisThis(Instruction instruction) voidwrite(Entrypoint _entryPoint) voidwriteInstruction(Instruction _instruction) voidwriteMethod(InstructionSet.MethodCall _methodCall, ClassModel.ConstantPool.MethodEntry _methodEntry) voidwritePragma(String _name, boolean _enable) voidstatic StringwriteToString(Entrypoint _entrypoint) Methods inherited from class com.aparapi.internal.writer.BlockWriter
convertCast, in, newLine, out, write, write, writeBlock, writeComposite, writeConditional, writeConditional, writeConditionalBranch16, writeGetterBlock, writeln, writeMethodBody, writeSequence
-
Field Details
-
cvtBooleanToChar
- See Also:
-
cvtBooleanArrayToCharStar
- See Also:
-
cvtBooleanArrayToChar
- See Also:
-
cvtByteToChar
- See Also:
-
cvtByteArrayToCharStar
- See Also:
-
cvtByteArrayToChar
- See Also:
-
cvtCharToShort
- See Also:
-
cvtCharArrayToShortStar
- See Also:
-
cvtCharArrayToShort
- See Also:
-
cvtIntArrayToIntStar
- See Also:
-
cvtIntArrayToInt
- See Also:
-
cvtFloatArrayToFloatStar
- See Also:
-
cvtFloatArrayToFloat
- See Also:
-
cvtDoubleArrayToDoubleStar
- See Also:
-
cvtDoubleArrayToDouble
- See Also:
-
cvtLongArrayToLongStar
- See Also:
-
cvtLongArrayToLong
- See Also:
-
cvtShortArrayToShortStar
- See Also:
-
cvtShortArrayToShort
- See Also:
-
IMPLICIT_PRIVATE_FIELDS
private static final boolean IMPLICIT_PRIVATE_FIELDSWhen declaring a __private struct pointer field, we always omit the "__private" qualifier. This is because the NVidia OpenCL compiler, at time of writing erroneously complains about explicitly qualifying pointers with __private ("error: field may not be qualified with an address space").- See Also:
-
entryPoint
-
javaToCLIdentifierMap
-
__local
- See Also:
-
__global
- See Also:
-
__constant
- See Also:
-
__private
- See Also:
-
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:
convertTypein 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:
writeMethodin classBlockWriter- Throws:
CodeGenException
-
isThis
-
writePragma
-
write
- Specified by:
writein classBlockWriter- Throws:
CodeGenException
-
writeThisRef
public void writeThisRef()- Overrides:
writeThisRefin classBlockWriter
-
writeInstruction
- Overrides:
writeInstructionin classBlockWriter- Throws:
CodeGenException
-
writeToString
- Throws:
CodeGenException
-