Campy in 1 minute

Make sure to install Net Core 2.0, You do not need Visual Studio. For the moment, you will need to install the CUDA GPU Toolkit for the dependency cudart64_91.dll. Once an app is “published”, it is completely sufficient.

mkdir test
cd test
dotnet new console
dotnet add package Campy
# copy the example code below into test.cs.
dotnet build
dotnet publish -r win10-x64
cd bin/Debug/netcoreapp2.0/win10-x64/publish/
# output should be four lines of integers, 0 to 3.



namespace test
    class Program
        static void Main(string[] args)
            int n = 4;
            int[] x = new int[n];
            Campy.Parallel.For(n, i => x[i] = i);
            for (int i = 0; i < n; ++i)

Additional examples in Campy test area (, including Reduction, various sorting algorithms, FFT, etc.


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This blog is kept spam free by WP-SpamFree.