High-Performance Graphics with DirectX in Racket
Abstract
Parallel processing is ubiquitous with modern computer systems. It has been supported by two major hardware advances: on the one hand, computer CPUs nowadays include several processing cores – even mobile device CPUs. On the other hand, the adoption of parallel processing has been bolstered in recent years thanks to the parallel processing capacities of graphics processing units (GPUs). General-purpose computing on graphics processing units (GPGPU) is one example of the versatile capacity of GPUs. Relying on the Microsoft DirectX 12 framework, we propose in this paper a novel approach to enable parallel processing for graphical rendering on both the CPU and GPU for the functional programming language Racket (formerly PLT Scheme). Importantly, this is achieved without compromising the usability and programmer-friendliness of Racket. Significant improvements are observed from the performance evaluation experiments with respect to the execution time (×3 speed-up in some cases), the CPU utilisation time (reduced by as much as 80% in some scenarios) and the frame rate in the case of animated graphics.
References
Antoine Bossard, “High-performance graphics in Racket with DirectX”, Proceedings of the 17th International Conference on Algorithms and Architectures for Parallel Processing, pp. 814–825, Helsinki, Finland, 2017.
Nvidia, GeForce GTX 1080 user guide, 2016.
Nathan Whitehead and Alex Fit-Florea, “Precision & performance: floating point and IEEE 754 compliance for Nvidia GPUs”, Nvidia, 2016.
Frank D. Luna, Introduction to 3D game programming with DirectX 12 (Chapter 4), Mercury Learning and Information, Dulles, VA, USA, 2016.
Microsoft, “DXGI”, MSDN. https://docs.microsoft.com/en-us/windows/win32/direct3ddxgi/dx-graphics-dxgi. Last accessed September 2019.
David Iseminger, Microsoft Win32 developer’s reference library – Microsoft Windows GDI, Microsoft, WA, USA, 2000.
Mahesh Chand, Graphics programming with GDI+, Addison-Wesley Professional, 2003.
Robert Bruce Findler, John Clements, Cormac Flanagan, Matthew Flatt, Shriram Krishnamurthi, Paul Steckler and Matthias Felleisen, “DrScheme: a programming environment for Scheme”, Journal of Functional Programming, Vol. 12, No. 2, pp. 159–182, 2002.
Matthew Flatt, “Creating languages in Racket”, Communications of the ACM, Vol. 55, No. 1, pp. 48–56, 2012.
Don Box, Essential COM, Addison-Wesley Professional, Boston, MA, USA, 1998.
R. B. Sheeparamatti, B. G. Sheeparamatti, Manjula Bharamagoudar, Nayan Ambali, “Simulink model for double buffering”, Proceedings of the 32nd Annual Conference on IEEE Industrial Electronics, pp. 4593–4597, Paris, 2006.
Microsoft, “Subclassing controls”, MSDN. https://docs.microsoft.com/en-us/windows/win32/controls/subclassing-overview. Last accessed September 2019.
Karl Rupp, “CPU, GPU and MIC hardware characteristics over time”, 2013–2016, https://www.karlrupp.net/2013/06/cpu-gpu-and-mic-hardwarecharacteristics-over-time. Last accessed September 2019.
Vincent Hindriksen, “Processors that can do 20+ GFLOPS per Watt”, 2012, https: //streamhpc.com/blog/2012-08-27/processors-that-can-do-20-gflopswatt/. Last accessed September 2019.
Wu-chun Feng and Kirk Cameron, “The green500 list: encouraging sustainable supercomputing”, Computer, Vol. 40, No. 12, pp. 50–55, 2007.