src/main.cpp
/// ***************************************************************************************************************************
/// Test for running simple addition using the single-threaded OpenCL BC interpreter on any heterogeneous device (e.g., a GPU).
/// OCLVM runs a sequential BC interpreter on the GPU. This means that ProtoVM launches a single
/// thread kernel that runs the whole application on the device.
/// ***************************************************************************************************************************
Test for running simple addition using the single-threaded OpenCL BC interpreter on any heterogeneous device .
OCLVM runs a sequential BC interpreter on the GPU. This means that ProtoVM launches a single
thread kernel that runs the whole application on the device.
Test for running simple addition using the single - threaded OpenCL BC interpreter on any heterogeneous device . OCLVM runs a sequential BC interpreter on the GPU . This means that ProtoVM launches a single thread kernel that runs the whole application on the device .
void testOpenCLInterpreter() {
    vector<int> hello = {
        ICONST, 128,
        ICONST, 1,
        IADD,
        GSTORE, 0,
        GLOAD, 0,
        PRINT,
        HALT
    };
    OCLVM oclVM(hello, 0);
    oclVM.setVMConfig(100, 100);
    oclVM.setPlatform(0);
    oclVM.setTrace();
    oclVM.initOpenCL("lib/interpreter.cl", false);
    oclVM.runInterpreter();
}
void testOpenCLInterpreter ( ) { vector < int > hello = { ICONST , 128 , ICONST , 1 , IADD , GSTORE , 0 , GLOAD , 0 , PRINT , HALT } ; OCLVM oclVM ( hello , 0 ) ; oclVM . setVMConfig ( 100 , 100 ) ; oclVM . setPlatform ( 0 ) ; oclVM . setTrace ( ) ; oclVM . initOpenCL ( " " , false ) ; oclVM . runInterpreter ( ) ; }
Test for running simple addition using the single-threaded OpenCL BC interpreter on any heterogeneous device (e.g., a GPU).
Test for running simple addition using the single - threaded OpenCL BC interpreter on any heterogeneous device ( e . g . a GPU ) .
// OpenCL Interpreter