문제

I'm using Aparapi to program OpenCL from Java.

However I can't find which Aparapi class converts Java byte code into OpenCL kernels. Can you point me at it please?

도움이 되었습니까?

해결책

There are a few classes used to convert to OpenCL.

The InstructionSet and ClassModel classes are used to parse the bytecode of the derived Kernel for analysis.

The MethodModel class takes the list of bytecodes for a single method and 'folds' it into a tree data structure suitable for representing higher level constructs (for/while and expressions).

The KernelWriter is the class responsible for 'rendering' the MethodModel to OpenCL.

If you look in the executeOpenCL method of KernelRunner you will see how Aparapi uses these classes to get access to the OpenCL.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top