nCLCompiler();
    compiler1.UseDevice(0);

    var compiler2 = new OpenCLCompiler();
    compiler1.UseDevice(1);

    compiler1.CompileKernel(typeof(ForLoopKernels));
    compiler2.CompileKernel(typeof(ForLoopKernels));

    float[] x = new float[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 };

    compiler1.Execute&lt;float&gt;(&quot;Sigmoid&quot;, x);
    PrintArray(x);

    Console.WriteLine();

    compiler2.Execute&lt;float&gt;(&quot;Threshold&quot;, x, 0.85f);
    PrintArray(x);
}

private void PrintArray(float[] d