示例#1
0
文件: CUDA.cs 项目: rblenis/cudafy
        public CUDAArray3DDescriptor GetArray3DDescriptor(CUarray devArr)
        {
            CUDAArray3DDescriptor pArrayDescriptor = new CUDAArray3DDescriptor();

            this.LastError = CUDADriver.cuArray3DGetDescriptor(ref pArrayDescriptor, devArr);
            return(pArrayDescriptor);
        }
示例#2
0
文件: CUDA.cs 项目: rblenis/cudafy
        public CUarray CreateArray(CUDAArray3DDescriptor desc)
        {
            CUarray pHandle = new CUarray();

            this.LastError = CUDADriver.cuArray3DCreate(ref pHandle, ref desc);
            return(pHandle);
        }
示例#3
0
文件: CUDA.cs 项目: rblenis/cudafy
        public CUarray CreateArray(CUArrayFormat format, uint numChannels, uint width, uint height, uint depth)
        {
            CUDAArray3DDescriptor desc = new CUDAArray3DDescriptor {
                Width       = width,
                Height      = height,
                Depth       = depth,
                Format      = format,
                Flags       = 0,
                NumChannels = numChannels
            };

            return(this.CreateArray(desc));
        }
示例#4
0
文件: CUDA.cs 项目: rblenis/cudafy
        public CUarray CreateArray(Array array, uint width, uint height, uint depth)
        {
            CUDAArray3DDescriptor desc = new CUDAArray3DDescriptor {
                Width  = width,
                Height = height,
                Depth  = depth,
                Flags  = 0
            };
            Type type = array.GetValue(0).GetType();

            desc.Format      = this.GetTypeFormat(type);
            desc.NumChannels = (uint)this.GetTypeComponents(type);
            return(this.CreateArray(desc));
        }
示例#5
0
 public static extern CUResult cuArray3DGetDescriptor(ref CUDAArray3DDescriptor pArrayDescriptor, CUarray hArray);
示例#6
0
 public static extern CUResult cuArray3DCreate(ref CUarray pHandle, ref CUDAArray3DDescriptor pAllocateArray);