当前位置: 首页>>代码示例>>C#>>正文


C# NppRoundMode类代码示例

本文整理汇总了C#中NppRoundMode的典型用法代码示例。如果您正苦于以下问题:C# NppRoundMode类的具体用法?C# NppRoundMode怎么用?C# NppRoundMode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


NppRoundMode类属于命名空间,在下文中一共展示了NppRoundMode类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DivA

		/// <summary>
		/// In place image division, scale by 2^(-nScaleFactor), then clamp to saturated value. Unchanged Alpha.
		/// </summary>
		/// <param name="src2">2nd source image</param>
		/// <param name="rndMode">Result Rounding mode to be used</param>
		/// <param name="nScaleFactor">scaling factor</param>
		public void DivA(NPPImage_8uC4 src2, NppRoundMode rndMode, int nScaleFactor)
		{
			status = NPPNativeMethods.NPPi.DivRound.nppiDiv_Round_8u_AC4IRSfs(src2.DevicePointerRoi, src2.Pitch, _devPtrRoi, _pitch, _sizeRoi, rndMode, nScaleFactor);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiDiv_Round_8u_AC4IRSfs", status));
			NPPException.CheckNppStatus(status, this);
		}
开发者ID:lvaleriu,项目名称:managedCuda,代码行数:12,代码来源:NPPImage_8uC4.cs

示例2: nppiDiv_Round_8u_C3IRSfs

 public static extern NppStatus nppiDiv_Round_8u_C3IRSfs(
     IntPtr pSrc,
     int nSrcStep,
     IntPtr pSrcDst,
     int nSrcDstStep,
     NppiSize oSizeROI,
     NppRoundMode rndMode,
     int nScaleFactor);
开发者ID:yhbyhb,项目名称:CSCuda,代码行数:8,代码来源:nppi_arithmetic_and_logical_operations.cs

示例3: nppiDiv_Round_8u_C4RSfs

 public static extern NppStatus nppiDiv_Round_8u_C4RSfs(
     IntPtr pSrc1,
     int nSrc1Step,
     IntPtr pSrc2,
     int nSrc2Step,
     IntPtr pDst,
     int nDstStep,
     NppiSize oSizeROI,
     NppRoundMode rndMode,
     int nScaleFactor);
开发者ID:yhbyhb,项目名称:CSCuda,代码行数:10,代码来源:nppi_arithmetic_and_logical_operations.cs

示例4: nppiConvert_32f8u_C4R

 public static extern NppStatus nppiConvert_32f8u_C4R(
     IntPtr pSrc,
     int nSrcStep,
     IntPtr pDst,
     int nDstStep,
     NppiSize oSizeROI,
     NppRoundMode eRoundMode);
开发者ID:yhbyhb,项目名称:CSCuda,代码行数:7,代码来源:nppi_data_exchange_and_initialization.cs

示例5: nppiConvert_32s16s_C1RSfs

 public static extern NppStatus nppiConvert_32s16s_C1RSfs(
     IntPtr pSrc,
     int nSrcStep,
     IntPtr pDst,
     int nDstStep,
     NppiSize oSizeROI,
     NppRoundMode eRoundMode,
     int nScaleFactor);
开发者ID:yhbyhb,项目名称:CSCuda,代码行数:8,代码来源:nppi_data_exchange_and_initialization.cs

示例6: Convert

		/// <summary>
		/// 64-bit double signal to 64-bit signed long.
		/// </summary>
		public static void Convert(this CudaDeviceVariable<double> pSrc, CudaDeviceVariable<long> pDst, NppRoundMode eRoundMode, int nScaleFactor)
		{
			NppStatus status = NPPNativeMethods.NPPs.Convert.nppsConvert_64f64s_Sfs(pSrc.DevicePointer, pDst.DevicePointer, pSrc.Size, eRoundMode, nScaleFactor);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppsConvert_64f64s_Sfs", status));
			NPPException.CheckNppStatus(status, pSrc);
		}
开发者ID:lvaleriu,项目名称:managedCuda,代码行数:9,代码来源:NPPsExtensionMethods.cs

示例7: Convert

		/// <summary>
		/// 32-bit unsigned to 32-bit signed conversion.
		/// </summary>
		/// <param name="dst">Destination image</param>
		/// <param name="roundMode">Round mode</param>
		/// <param name="scaleFactor">scaling factor</param>
		public void Convert(NPPImage_32sC1 dst, NppRoundMode roundMode, int scaleFactor)
		{
			status = NPPNativeMethods.NPPi.BitDepthConversion.nppiConvert_32u32s_C1RSfs(_devPtrRoi, _pitch, dst.DevicePointerRoi, dst.Pitch, _sizeRoi, roundMode, scaleFactor);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiConvert_32u32s_C1RSfs", status));
			NPPException.CheckNppStatus(status, this);
		}
开发者ID:lvaleriu,项目名称:managedCuda,代码行数:12,代码来源:NPPImage_32uC1.cs

示例8: Div_Round

		/// <summary>
		/// 16-bit signed short in place signal divide signal, with scaling, rounding
		/// then clamp to saturated value.
		/// </summary>
		/// <param name="pSrc">Source signal pointer.</param>
		/// <param name="pSrcDst">In-Place Signal Pointer. signal1 divisor elements to be divided into signal2 dividend elements</param>
		/// <param name="nRndMode">various rounding modes.</param>
		/// <param name="nScaleFactor">Integer Result Scaling.</param>
		public static void Div_Round(this CudaDeviceVariable<short> pSrcDst, CudaDeviceVariable<short> pSrc, NppRoundMode nRndMode, int nScaleFactor)
		{
			NppStatus status = NPPNativeMethods.NPPs.DivRoundSignal.nppsDiv_Round_16s_ISfs(pSrc.DevicePointer, pSrcDst.DevicePointer, pSrcDst.Size, nRndMode, nScaleFactor);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppsDiv_Round_16s_ISfs", status));
			NPPException.CheckNppStatus(status, pSrcDst);
		}
开发者ID:lvaleriu,项目名称:managedCuda,代码行数:14,代码来源:NPPsExtensionMethods.cs

示例9: nppsDiv_Round_8u_Sfs

 public static extern NppStatus nppsDiv_Round_8u_Sfs(
     IntPtr pSrc1,
     IntPtr pSrc2,
     IntPtr pDst,
     int nLength,
     NppRoundMode nRndMode,
     int nScaleFactor);
开发者ID:yhbyhb,项目名称:CSCuda,代码行数:7,代码来源:npps_arithmetic_and_logical_operations.cs

示例10: nppsDiv_Round_16u_ISfs

 public static extern NppStatus nppsDiv_Round_16u_ISfs(
     IntPtr pSrc,
     IntPtr pSrcDst,
     int nLength,
     NppRoundMode nRndMode,
     int nScaleFactor);
开发者ID:yhbyhb,项目名称:CSCuda,代码行数:6,代码来源:npps_arithmetic_and_logical_operations.cs

示例11: Convert

 /// <summary>
 /// 32-bit floating point to 16-bit unsigned conversion.
 /// </summary>
 /// <param name="dst">Destination image</param>
 /// <param name="roundMode">Flag specifying how fractional float values are rounded to integer values.</param>
 public void Convert(NPPImage_16uC3 dst, NppRoundMode roundMode)
 {
     status = NPPNativeMethods.NPPi.BitDepthConversion.nppiConvert_32f16u_C3R(_devPtrRoi, _pitch, dst.DevicePointerRoi, dst.Pitch, _sizeRoi, roundMode);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiConvert_32f16u_C3R", status));
     NPPException.CheckNppStatus(status, this);
 }
开发者ID:kunzmi,项目名称:managedCuda,代码行数:11,代码来源:NPPImage_32fC3.cs

示例12: nppsConvert_32f16s_Sfs

 public static extern NppStatus nppsConvert_32f16s_Sfs(
     IntPtr pSrc,
     IntPtr pDst,
     int nLength,
     NppRoundMode eRoundMode,
     int nScaleFactor);
开发者ID:yhbyhb,项目名称:CSCuda,代码行数:6,代码来源:npps_conversion_functions.cs


注:本文中的NppRoundMode类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。