Exemple #1
0
        public CUDAArray3DDescriptor GetArray3DDescriptor(CUarray devArr)
        {
            CUDAArray3DDescriptor pArrayDescriptor = new CUDAArray3DDescriptor();

            this.LastError = CUDADriver.cuArray3DGetDescriptor(ref pArrayDescriptor, devArr);
            return(pArrayDescriptor);
        }
Exemple #2
0
        public CUarray CreateArray(CUDAArray3DDescriptor desc)
        {
            CUarray pHandle = new CUarray();

            this.LastError = CUDADriver.cuArray3DCreate(ref pHandle, ref desc);
            return(pHandle);
        }
Exemple #3
0
        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));
        }
Exemple #4
0
        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));
        }
 public static extern CUResult cuArray3DGetDescriptor(ref CUDAArray3DDescriptor pArrayDescriptor, CUarray hArray);
 public static extern CUResult cuArray3DCreate(ref CUarray pHandle, ref CUDAArray3DDescriptor pAllocateArray);