API Quick Reference Guide

  • 2020
  • 09/30/2019
  • Public Content
Contents

Core Functionality

IwException

Stores an error code value for an exception returned by the function.
class IwException { public: // Constructor with status assignment IwException( IppStatus status // Intel IPP status value ); // Default destructor ~IwException() {} // IwException to IppStatus cast operator inline operator IppStatus() const; IppStatus m_status; // Stored Intel IPP status value };

IwValue

Stores values for an array for array type casting
template<typename DST> class IwValue { public: // Default constructor. Sets an array to zero. IwValue(); // Uniform template-based constructor. Sets channels to one value. template<typename SRC> IwValue(SRC valUniform); // 3-channel template-based constructor. Sets channels to individual values. template<typename SRC> IwValue(SRC valC1, SRC valC2, SRC valC3); // 4-channel template-based constructor. Sets channels to individual values. template<typename SRC> IwValue(SRC valC1, SRC valC2, SRC valC3, SRC valC4); // Buffer template-based constructor. Sets values from a buffer of a specific type. template<typename SRC> IwValue(SRC *pBuffer, unsigned int channels); // Buffer parameter-based constructor. Sets values from a buffer of a specific type. IwValue(void *pBuffer, IppDataType type, unsigned int channels); // Uniform template setter. Sets channels to one value. template<typename SRC> void SetValue(SRC valUniform); // 3-channel template setter. Sets channels to individual values. template<typename SRC> void SetValue(SRC valC1, SRC valC2, SRC valC3); // 4-channel template setter. Sets channels to individual values. template<typename SRC> void SetValue(SRC valC1, SRC valC2, SRC valC3, SRC valC4); // Buffer template-based setter. Sets values from a buffer of a specific type. template<typename SRC> void SetValue(SRC *pBuffer, unsigned int channels); // Buffer parameter-based setter. Sets values from a buffer of a specific type. void SetValue(void *pBuffer, IppDataType type, unsigned int channels); // Returns number of initialized values. int ValuesNum() const; // IwValue to the Ipp64f cast operator. inline operator DST () const; // IwValue to the Ipp64f* cast operator. inline operator DST* () const; // IwValue to the const Ipp64f* cast operator. inline operator const DST* () const; private: int m_values; // Number of initialized values. DST m_val[4]; // Reserve 4 channels. }; typedef IwValue<Ipp64f> IwValueFloat; typedef IwValue<Ipp32s> IwValueInt;

iwTypeToSize

Converts
IppDataType
to actual length, in bytes. Returns the size of
IppDataType
, in bytes.
IW_DECL_CPP(int) iwTypeToSize( IppDataType type // Data type );

iwTypeIsFloat

Returns 1 if data type is of float type, and 0 otherwise.
IW_DECL_CPP(int) iwTypeIsFloat( IppDataType type // Data type );

iwTypeGetMin

Returns minimum possible value for the specified data type.
IW_DECL_CPP(double) iwTypeGetMin( IppDataType type // Data type for min value );

iwTypeGetMax

Returns maximum possible value for the specified data type.
IW_DECL_CPP(double) iwTypeGetMax( IppDataType type // Data type for max value );

iwTypeGetRange

Returns the range of values for the specified data type.
IW_DECL_CPP(double) iwTypeGetRange( IppDataType type // Data type for a range value );

iwValueSaturate

Casts double value to input type with rounding and saturation.
IW_DECL_CPP(double) iwValueSaturate( double val, // Input value IppDataType dstType // Data type for a saturation range );

iwValueRelToAbs

Converts a relative value in range of [0, 1] to an absolute value according the specified type.
IW_DECL_CPP(double) iwValueRelToAbs( double val, // Relative value. From 0 to 1. IppDataType type // Data type for the absolute range )

IwTls

Template-based TLS abstraction layer class.
// Template-based TLS abstraction layer class. // This is an extention of C IwTls structure with automatic objects destruction template<class TYPE> class IwTls: private ::IwTls { public: // Default constructor IwTls(); // Default destructor ~IwTls(); // Allocates an object for a current thread and returns a pointer to it TYPE* Create(); // Releases an object for a current thread void Release(); // Releases objects for all threads void ReleaseAll(); // Returns pointer to an object for a current thread TYPE* Get() const; private: // Object destructor static void __STDCALL TypeDestructor(void *pData); };

IwSetCpuFeaturesRegion

Sets Intel IPP optimizations for the current region and restores the original optimizations at the end of the region.
// This class sets Intel IPP optimizations for the current region and restores previous optimizations at the region end class IwSetCpuFeaturesRegion { public: // Default constructor. Saves current enabled CPU features. IwSetCpuFeaturesRegion(); // Saves current enabled CPU features and sets new features mask. IwSetCpuFeaturesRegion(Ipp64u featuresMask); // Sets new features mask for the region. IppStatus Set(Ipp64u featuresMask); // Default destructor. Restores saved features mask. ~IwSetCpuFeaturesRegion(); private: Ipp64u m_stored; };

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.