News Archives

Codeplay Blog: Enabling Polymorphism in SYCL using the C++ idiom CRTP

Georgi Mirazchiyski, Codeplay Developer Relations Engineer has posted a tutorial introducing the Curiously Recurring Template Pattern. Dynamic polymorphism is a widely used C++ feature that allows code to be more flexible, and helps create easily extendable interfaces by overriding the base class specified interfaces inside our derived classes. However, in SYCL kernel code in order to emulate dynamic polymorphism we need to use some curious tricks and techniques.