OOP on the GPU: An OpenCLS Extension
Authors
Term
4. term
Education
Publication year
2016
Submitted on
2016-06-11
Pages
102
Abstract
This report details the development of OpenCLS 2, an extension of the OpenCLS 1 project. The OpenCLS 2 project aims to reduce split codebases for GPU development, by allowing CPU code (C#) to be compiled to GPU code (OpenCL C) and executed on the GPU. The focus of OpenCLS 2 is to extend the set of features that the OpenCLS projects support, by implementing support for object-oriented programming (OOP) through the three OOP pillars: inheritance, encapsulation and polymorphism. This is achieved through the Roslyn platform and the OpenCL wrapper CLOO. The Roslyn platform is utilized to build a syntax tree for C# code, which OpenCLS 2 iterates through to generate OpenCL C code. The OpenCL C code is then executed on the GPU using CLOO. The implementations of inheritance, encapsulation and polymorphism are tested through unit tests, design pattern tests, all of which OpenCLS 2 passes. OpenCLS 2 achieves similar performance to related work, and better performance than the CPU by a factor of 3.5 for large computation and without host-device communication.
Documents
