October 2019

Cppcon 2019 Milestone | New Home | Trip Reports--Jon Kalb

Many things happened.

Milestone | New Home | Trip Reports

by Jon Kalb

From the article:

CppCon 2019 was the first year in our new home at the Gaylord Rockies in Aurora, Colorado.

Long before I’d ever done it, I told people that I thought that moving a conference is almost as much work as starting one from scratch. Now that I have moved a conference, I’ve learned that started a conference from scratch is actually easier than moving that conference after it has been growing in one location for five years...

Join the Maryland C++ User Group

If you live in the area.

Join the Maryland C++ User Group

From the article:

After looking for and failing to find a C++ user group in Maryland, I decided to start one. If you live in the Baltimore/DC/NoVA area, use C++ for work or pleasure, and are interested in attending monthly-ish meetings related to C++, please join the meetup group at https://meetup.com/CppMaryland/. Topics for discussion will include current (C++11/14/17) features, the upcoming C++20 standard, build tools, standard containers and algorithms, design patterns, and pretty much anything else that might benefit a C++ developer...

Alternatives to C++ Function Pointers in SYCL using Function Objects -- Georgi Mirazchiyski

This blog post offers an interesting solution for replacing function pointers with function objects and lambdas.

Alternatives to C++ Function Pointers in SYCL using Function Objects

by Georgi Mirazchiyski

From the article:

Function Pointers are a feature of the C language and so form part of the C++ standard. As such, a function pointer allows the following behavior:

    "A pointer to a function can be passed as a parameter to another function"

In C++, especially in modern C++, function pointers are a legacy feature from the C language but they still exist in some code bases.

SYCL enables single source development where template functions can contain both host and device code to construct complex algorithms that use acceleration. However, SYCL does not provide support for function pointers since this is a limitation posed by the design of OpenCL v1.2 which is the basis of the current SYCL v1.2.1 definition.

But there is good news, we can use modern C++ to implement a solution that can be used with SYCL. SYCL is built with C++11 (and onward depending on the implementation), meaning features like anonymous functions known as "lambdas" can be used with little to zero overhead. Even going back to C++98/03 it is possible to use function objects defined as either structs or classes, and additionally, you can template your operation (the computation logic) to provide a generic way to consume the function objects or lambdas.