Hybridizer supports various “advanced” C# constructs, such as Virtual functions Generics Delegates and lambdas These features help the user to write expressive and reusable code. But performance wise, they come at a cost. This post will detail these costs, and how to mitigate them. We performed all performance measurements with a GeForce 1080 Ti, on […]
As every modern language, C# exposes the null reference billion dollar mistake. On the other hand, native languages such as CUDA or C/C++ expose null pointers. To mitigate that, latest versions of compilers tend to introduce some form of automatic null checks. For example, Typescript recently added a –strictNullChecks option, and C#, following a proposal, […]
Tags: CUDA, Essentials, null checks
As a way to demonstrate Hybridizer’s capabilities, we wrote a simple Windows demo application for fractal rendering. Demo application Compute code is written in C# and features floating point arithmetic, function calls, conditions, loops, Parallel.For and bit manipulations: [Kernel] public static int IterCount(double cx, double cy, int maxiter) { int result = 0; double x […]
System.Numerics.Vector is a library provided by .Net (as a nuget package), which tries to leverage SIMD instruction on target hardware. It exposes a few value types, such as Vector<T>, which are recognized by RyuJIT as intrinsics. Supported intrinsics are listed in the core-clr github repository. This allows C# SIMD acceleration, as long as code is […]