src/main.cpp
/// ***************************************************************************************************************************
/// Parallel BC Interpreter
/// ***************************************************************************************************************************1
/// Test for running simple multiplication using the **PARALLEL** OpenCL BC interpreter on any heterogeneous device (e.g., a GPU).
/// OCLVMParallel launches many threads (as many as data items to compute). The stack is stored in private memory. Additionally,
/// this version uses a multi-heap approach and it makes uses of the BC THREAD_ID, which loads the thread-id onto the stack,
/// and PARALLEL_GLOAD_INDEXED,PARALLEL_GSTORE_INDEXED for accessing data using the thread-id in a multi-heap configuration.
/// ***************************************************************************************************************************
/**
 * Note: the stack has to either in global memory
 *       or private memory. Otherwise results 
*        are wrong.
 */
Parallel BC Interpreter
1
Test for running simple multiplication using the **PARALLEL** OpenCL BC interpreter on any heterogeneous device .
OCLVMParallel launches many threads (as many as data items to compute). The stack is stored in private memory. Additionally,
this version uses a multi-heap approach and it makes uses of the BC THREAD_ID, which loads the thread-id onto the stack,
and PARALLEL_GLOAD_INDEXED,PARALLEL_GSTORE_INDEXED for accessing data using the thread-id in a multi-heap configuration.

the stack has to either in global memory
or private memory. Otherwise results
are wrong.
Parallel BC Interpreter 1 Test for running simple multiplication using the ** PARALLEL ** OpenCL BC interpreter on any heterogeneous device . OCLVMParallel launches many threads ( as many as data items to compute ) . The stack is stored in private memory . Additionally this version uses a multi - heap approach and it makes uses of the BC THREAD_ID which loads the thread - id onto the stack and PARALLEL_GLOAD_INDEXED PARALLEL_GSTORE_INDEXED for accessing data using the thread - id in a multi - heap configuration . the stack has to either in global memory or private memory . Otherwise results are wrong .
void runOpenCLParallelIntepreterLoop() {
    int size = 1024;
    int groupSize = 16;
    vector<int> vectorMul = {
        THREAD_ID,
        DUP,
        PARALLEL_GLOAD_INDEXED, 0,          
        THREAD_ID,  
        PARALLEL_GLOAD_INDEXED, 1,        
        IMUL,
        PARALLEL_GSTORE_INDEXED, 2,
        HALT
    };
    OCLVMParallelLoop oclVM(vectorMul, 0);
    oclVM.setVMConfig(100, 1024);
    oclVM.setHeapSizes(1024);
    oclVM.setPlatform(0);
    oclVM.initOpenCL("lib/interpreterParallelLoop.cl", false);
    oclVM.initHeap();
    oclVM.runInterpreter(1024, groupSize);
}
void runOpenCLParallelIntepreterLoop ( ) { int size = 1024 ; int groupSize = 16 ; vector < int > vectorMul = { THREAD_ID , DUP , PARALLEL_GLOAD_INDEXED , 0 , THREAD_ID , PARALLEL_GLOAD_INDEXED , 1 , IMUL , PARALLEL_GSTORE_INDEXED , 2 , HALT } ; OCLVMParallelLoop oclVM ( vectorMul , 0 ) ; oclVM . setVMConfig ( 100 , 1024 ) ; oclVM . setHeapSizes ( 1024 ) ; oclVM . setPlatform ( 0 ) ; oclVM . initOpenCL ( " " , false ) ; oclVM . initHeap ( ) ; oclVM . runInterpreter ( 1024 , groupSize ) ; }
Parallel BC Interpreter
1
Test for running simple multiplication using the **PARALLEL** OpenCL BC interpreter on any heterogeneous device (e.g., a GPU).
Parallel BC Interpreter 1 Test for running simple multiplication using the ** PARALLEL ** OpenCL BC interpreter on any heterogeneous device ( e . g . a GPU ) .