IPP入门的话,直接看example就好,快准狠!看完直接开始写代码。
对于IPP里面的东西做一些特别的说明。
我们经常看到动态链接和静态链接,what 是动态链接和静态链接?
The ippInit function detects the processor type and sets the dispatcher to use the processor-specific code of the Intel® IPP library corresponding to the instruction set capabilities available.
In some cases like debugging and performance analysis, you may want to get the data on the difference between various processor-specific codes on the same machine. Use the ippInitCpu function for this. This function sets the dispatcher to use the processor-specific code according to the specified processor type without querying the system.
The ippInit and ippInitCpu functions are a part of the ippCore library.
The ippGetStatusString function decodes the numeric status return value of Intel® IPP functions and converts them to a human readable text:
status= ippInit(); if( status != ippStsNoErr ) { printf("IppInit() Error:\n"); printf("%s\n", ippGetStatusString(status) ); return -1; }
The ippGetStatusString function is a part of the ippCore library.
Each domain has its own GetLibVersion function that returns information about the library layer in use from the dispatcher. The code snippet below demonstrates the usage of the ippiGetLibVersion from the image processing domain:
const IppLibraryVersion* lib = ippiGetLibVersion(); printf(“%s %s %d.%d.%d.%d\n”, lib->Name, lib->Version, lib->major, lib->minor, lib->majorBuild, lib->build);
Use this function in combination with ippInitCpu to compare the output of different implementations on the same machine.
Intel IPP functions provide better performance if they process data with aligned pointers. Intel IPP provides the following functions to ensure that data is 32-byte aligned:
void* ippMalloc(int length) void ippFree(void* ptr)
The ippMalloc function provides a 32-byte aligned buffer, and the ippFree function frees it.
The signal and image processing libraries provide ippsMalloc and ippiMalloc functions, respectively, to allocate a 32-byte aligned buffer that can be freed by the ippsFree and ippiFree functions.
Thread Managing(调用几个线程)
By default, the number of threads for Intel IPP threaded libraries follows the OpenMP* default, which is the number of logical processors visible to the operating system. If the value of the OMP_NUM_THREADS environment variable is less than the number of processors, then the number of threads for Intel IPP threaded libraries equals the value of the OMP_NUM_THREADS environment variable.
To configure the number of threads used by Intel IPP internally, at the very beginning of an application call the ippSetNumThreads(n) function, where n is the desired number of threads (1, ...). To disable internal parallelization, call the ippSetNumThreads(1) function.
To find the number of threads created by the Intel IPP, call the ippGetNumThreads function.
到目前为止估计你已经对于IPP有那么多多少少一点认识,接下来就去看example吧!或者直接百度,我只是闲的蛋疼才看这些的
PS:如果你想进行自动补全的话,按Alt + RIGHT ARROW or Ctrl + SPACEBAR。