Discover and read the best of Twitter Threads about #pragma

Most recents (3)

Let's make a silly experiment.
For every like this post receives in the next 24 hours, I will post one tip for heuristic/bot programming contests.

I will start posting these as a thread in ~1h from now.

I could talk about those things for days, so bring it on!
This is going to be a long ride 😅

Small disclaimer first: I'm limited to 280 characters per tip. Sometimes it's going to be hard to squeeze 15 years of experience into a single tweet. A lot of details are going to be left out, etc.
#0: Free tip

Everyone is unique & has different background. Each one of us struggles with different subjects.

Not every piece of advice is going to be applicable for you, but I'll try making all tips as general as possible & mention if something is situation specific.
Read 99 tweets
I have checked in improvements to #VulkanScneneGraph shader composition support so that now a range of shader variants can be pre-compiled to SPIR-V and built as part of the library itself:

github.com/vsg-dev/Vulkan…

This can mean no more loading and compiling shaders at runtime!
Shader composition might at first seem like another layer of complexity on top of GLSL shaders, but it actually makes shader and C++ code management easier once you understand how to use it.

To explain the improvements I've started a thread on vsg-users:
groups.google.com/g/vsg-users/c/…
The #VulkanSceneGraph uses the #pragma(tic) shader composition approach that I developed as part of the #OpenScenegraph project, allow apps to inject #define into shader compilation

This text.vert shader illustrates use of 3 different #defines:
github.com/vsg-dev/vsgExa…
Read 6 tweets
When I let myself spend a day doing CUDA work, I'm usually quite happy afterwards. Optimization is a grand puzzle game with an objective score function! I have to make myself stop at a wise point, despite all the intriguing rabbit holes left to pursue. \
CUDA is not my go-to go-fast tool -- with a modern, big CPU, it is pretty great how much performance you can trivially get with #pragma omp parallel for. The last couple times I have done it, my first cut at a CUDA kernel was slower than the C++ running on 128 threads. \
After dialing everything in for occupancy and memory traffic it usually winds up 6x+ faster, unless it really leans on GPU features like tensor ops or texture filtering, which can go much higher. Of course, I only bother with functions I know will turn out well. Many won't. \
Read 5 tweets

Related hashtags

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!