OPEN CASCADE uses GPUs to accelerate CAD applications
OPEN CASCADE team investigates the use of OpenCL*. This GPU programming language was tested for visualization of a CSG model consisting of thousands primitives and Boolean operations between them. The use of OpenCL allows increasing the visualization performance using multicored GPUs of present-day video cards.
OpenCL (Open Computing Language) is a framework for writing programs executed onšheterogeneousšplatforms and able to use all the power of all CPUs and GPUs available on a particular platform. OpenCL providesšparallel computingšusing task-based and data-based parallelism. OpenCL allows any application to use the Graphics Processing Unit for non-graphical computing extending the power of the Graphics Processing Unit beyond just graphics-intensive applications such as games and 3D modeling.
The development of OpenCL was entrusted to the Khronos Group in the summer of 2008 with the goal of forging a cross platform environment for general purpose computing on GPUs. For now hundreds of kinds of video cards of different vendors can be programmed in OpenCL.
Present-day GPUs are highly parallel, multithreaded, multicore processors with tremendous computational power and very high memory bandwidth. If an algorithm could be divided into parallel threads, it could be more efficient to launch it on a GPU. OPEN CASCADE development team decided to test this architecture on an algorithm which best demonstrates the performance of a video-card: ray tracing visualization. In this algorithm presentation is computed on the fly: in each pixel of the resulting image color is computed independently from other pixels. This task could be well-parallelized and performed only by the video card. The resulting image is calculated and displayed using the video card memory. CPU and main memory remain unloaded.
One of the test cases was a large sphere with thousands of cut small spheres. As a result of a conventional approach for visualization - topological Boolean operations - it takes several hours to perform a thousand of cuts. This technique may be used for fast visualization of any shape (consisting of any kind of surfaces, any kinds of Boolean operations) without computation of the boundary representation.
As a result of OpenCL tests the application performs the visualization model on a mid-level video card with a speed higher than 10 FPS (a window of 512x512 pixels). This perfect result proves the usability of OpenCL language and demonstrates superior GPU performance for some well-parallelized tasks that appear in the process of Open CASCADE Technology development.
* OpenCL is a trademark of Apple Inc., used under license by Khronos.