Beispiel #1
0
        public void TestAddGpuData()
        {
            var ta = new GpuArrayWrite <float>(20);

            ta.AddGpuData(val: 2.2f, index: 4, block: new d3(44), thread: new d3(22));
            ta.AddGpuData(val: 2.3f, index: 3, block: new d3(33), thread: new d3(22));
            ta.AddGpuData(val: 2.2f, index: 4, block: new d3(55), thread: new d3(22));

            var l = ta.GetAllGpuDatas().ToList();
        }
Beispiel #2
0
 public GpuArrayVm(
     GpuArrayWrite <float> gpuArrayWrite,
     R <int> latticeBounds,
     string title  = "Title",
     string titleX = "TitleX",
     string titleY = "TitleY") : base(latticeBounds, title, titleX, titleY)
 {
     GpuArrayWrite = gpuArrayWrite;
     SetUpdater(MakeTileVm);
 }
Beispiel #3
0
        public void TestKernelNoTile()
        {
            var blockCount  = new d3(4);
            var threadCount = new d3(2);
            var arrayOut    = new GpuArrayWrite <int>(blockCount.Volume() * threadCount.Volume());

            GpuDevice.RunGpuKernel(
                blockCount,
                threadCount,
                TestKernels.IntKernelWrap(arrayOut, blockCount, threadCount));
        }