Ejemplo n.º 1
0
 /// <summary>
 /// allocates new matrix data unless the matrix already has specified size and type.
 /// </summary>
 /// <param name="rows">Number of rows in a 2D array.</param>
 /// <param name="cols">Number of columns in a 2D array.</param>
 /// <param name="type">Array type. </param>
 /// <param name="allocType"></param>
 public void Create(
     int rows, int cols, MatType type,
     CudaMemAllocType allocType = CudaMemAllocType.Locked)
 {
     ThrowIfDisposed();
     NativeMethods.gpu_CudaMem_create(ptr, rows, cols, type, (int)allocType);
 }
Ejemplo n.º 2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="size">2D array size: Size(cols, rows) </param>
 /// <param name="type">Array type. </param>
 /// <param name="allocType"></param>
 public CudaMem(Size size, MatType type,
                CudaMemAllocType allocType = CudaMemAllocType.Locked)
     : this(size.Height, size.Width, type, allocType)
 {
 }
Ejemplo n.º 3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="rows">Number of rows in a 2D array.</param>
 /// <param name="cols">Number of columns in a 2D array.</param>
 /// <param name="type">Array type. </param>
 /// <param name="allocType"></param>
 public CudaMem(int rows, int cols, MatType type,
                CudaMemAllocType allocType = CudaMemAllocType.Locked)
 {
     ThrowIfNotAvailable();
     ptr = NativeMethods.gpu_CudaMem_new3(rows, cols, type, (int)allocType);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="size">2D array size: Size(cols, rows) </param>
 /// <param name="type">Array type. </param>
 /// <param name="allocType"></param>
 public CudaMem(Size size, MatType type, 
     CudaMemAllocType allocType = CudaMemAllocType.Locked)
     : this(size.Height, size.Width, type, allocType)
 {            
 }
Ejemplo n.º 5
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="rows">Number of rows in a 2D array.</param>
 /// <param name="cols">Number of columns in a 2D array.</param>
 /// <param name="type">Array type. </param>
 /// <param name="allocType"></param>
 public CudaMem(int rows, int cols, MatType type, 
     CudaMemAllocType allocType = CudaMemAllocType.Locked)
 {
     ThrowIfNotAvailable();
     ptr = NativeMethods.gpu_CudaMem_new3(rows, cols, type, (int)allocType);
 }
Ejemplo n.º 6
0
 /// <summary>
 /// allocates new matrix data unless the matrix already has specified size and type.
 /// </summary>
 /// <param name="rows">Number of rows in a 2D array.</param>
 /// <param name="cols">Number of columns in a 2D array.</param>
 /// <param name="type">Array type. </param>
 /// <param name="allocType"></param>
 public void Create(
     int rows, int cols, MatType type, 
     CudaMemAllocType allocType = CudaMemAllocType.Locked)
 {
     ThrowIfDisposed();
     NativeMethods.gpu_CudaMem_create(ptr, rows, cols, type, (int)allocType);
 }