示例#1
0
 public GPU_ByteData2D(byte[,] data)
 {
     if (data == null)
     {
         return;
     }
     _view = ILGPUMethods.Allocate(data);
     AxesX = Enumerable.Range(0, data.GetLength(0));
     AxesY = Enumerable.Range(0, data.GetLength(1));
 }
 public GPU_ByteData(byte[] data)
 {
     _view = ILGPUMethods.Allocate(data);
     AxesX = Enumerable.Range(0, data.Length);
 }
 public GPU_ByteData(int size)
 {
     _view = ILGPUMethods.Allocate <byte>(size);
     AxesX = Enumerable.Range(0, size);
 }
 public GPU_FloatData2D(float[,] data)
 {
     _view = ILGPUMethods.Allocate(data);
     AxesX = Enumerable.Range(0, data.GetLength(0));
     AxesY = Enumerable.Range(0, data.GetLength(1));
 }
 public GPU_FloatData2D(int w, int h)
 {
     _view = ILGPUMethods.Allocate <float>(new Index2(w, h));
     AxesX = Enumerable.Range(0, w);
     AxesY = Enumerable.Range(0, h);
 }
 public GPU_FloatData(float[] data)
 {
     _view = ILGPUMethods.Allocate(data);
     AxesX = Enumerable.Range(0, data.Length).ToArray();
 }
 public GPU_FloatData(int size)
 {
     _view = ILGPUMethods.Allocate <float>(size);
     AxesX = Enumerable.Range(0, size).ToArray();
 }