If somebody moves Powder Toy to C#

  • tugrul_512bit
    13th Apr 2017 Member 0 Permalink

    I wanted to tell there is an open-source multi-device GPGPU API for C#: https://github.com/tugrul512bit/Cekirdekler/wiki

     

    and some tutorial: https://www.codeproject.com/Articles/1181213/Easy-OpenCL-Multiple-Device-Load-Balancing-and-Pip

     

    hello world:

     

                ClNumberCruncher cr = new ClNumberCruncher(
                    AcceleratorType.GPU, @"
                        __kernel void hello(__global char * arr)
                        {
                            printf(""hello world"");
                        }
                    ");
    
                ClArray<byte> array = new ClArray<byte>(8192);
                array.compute(cr, 1, "hello", 8192, 256); 

     

  • boxmein
    13th Apr 2017 Former Staff 1 Permalink
    There's multiple APIs providing compute on C++ as well, such as OpenCL and Cuda and even Vulkan. It just needs implementing and will change a lot about how current saves will work. There's a branch of TPT meant to offload shader calculations (fancy effects for gravity, fire and water) to the graphics card, but that's pretty much abandoned as far as I know.

    Vulkan could be a good candidate in fact for the same purpose, especially considering the lower-level approach and strong support on major OSes.

  • tugrul_512bit
    13th Apr 2017 Member 0 Permalink

    @boxmein (View Post)

     

    Vulkan is the best. It that can do vision and compute at the same time.