Esempio n. 1
0
		/// <summary>
		/// Divide constant to image, scale by 2^(-nScaleFactor), then clamp to saturated value. Inplace.
		/// </summary>
		/// <param name="nConstant">Value</param>
		/// <param name="nScaleFactor">scaling factor</param>
		public void Div(Npp32sc nConstant, int nScaleFactor)
		{
			status = NPPNativeMethods.NPPi.DivConst.nppiDivC_32sc_C1IRSfs(nConstant, _devPtrRoi, _pitch, _sizeRoi, nScaleFactor);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiDivC_32sc_C1IRSfs", status));
			NPPException.CheckNppStatus(status, this);
		}
Esempio n. 2
0
		/// <summary>
		/// Multiply constant to image, scale by 2^(-nScaleFactor), then clamp to saturated value.
		/// </summary>
		/// <param name="nConstant">Value</param>
		/// <param name="dest">Destination image</param>
		/// <param name="nScaleFactor">scaling factor</param>
		public void Mul(Npp32sc nConstant, NPPImage_32scC1 dest, int nScaleFactor)
		{
			status = NPPNativeMethods.NPPi.MulConst.nppiMulC_32sc_C1RSfs(_devPtrRoi, _pitch, nConstant, dest.DevicePointerRoi, dest.Pitch, _sizeRoi, nScaleFactor);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiMulC_32sc_C1RSfs", status));
			NPPException.CheckNppStatus(status, this);
		}
		/// <summary>
		/// 32-bit integer complex number (32 bit real, 32 bit imaginary)signal subtract constant
		/// and scale.
		/// </summary>
		/// <param name="pSrc">Source signal pointer.</param>
		/// <param name="nValue">Constant value to be subtracted from each vector element</param>
		/// <param name="pDst">Destination signal pointer.</param>
		/// <param name="nScaleFactor">Integer Result Scaling.</param>
		public static void SubC(this CudaDeviceVariable<Npp32sc> pSrc, CudaDeviceVariable<Npp32sc> pDst, Npp32sc nValue, int nScaleFactor)
		{
			NppStatus status = NPPNativeMethods.NPPs.SubC.nppsSubC_32sc_Sfs(pSrc.DevicePointer, nValue, pDst.DevicePointer, pSrc.Size, nScaleFactor);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppsSubC_32sc_Sfs", status));
			NPPException.CheckNppStatus(status, pSrc);
		}
Esempio n. 4
0
		/// <summary>
		/// Set pixel values to nValue.
		/// </summary>
		/// <param name="nValue">Value to be set</param>
		public void Set(Npp32sc nValue)
		{
			status = NPPNativeMethods.NPPi.MemSet.nppiSet_32sc_C1R(nValue, _devPtrRoi, _pitch, _sizeRoi);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiSet_32sc_C1R", status));
			NPPException.CheckNppStatus(status, this);
		}
		/// <summary>
		/// 32-bit integer complex, vector set method.
		/// </summary>
		/// <param name="nValue">Value used to initialize the vector pDst.</param>
		/// <param name="pDst">Destination signal pointer.</param>
		public static void Set(this CudaDeviceVariable<Npp32sc> pDst, Npp32sc nValue)
		{
			NppStatus status = NPPNativeMethods.NPPs.Set.nppsSet_32sc(nValue, pDst.DevicePointer, pDst.Size);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppsSet_32sc", status));
			NPPException.CheckNppStatus(status, pDst);
		}