{"id":274828,"date":"2016-02-24T11:28:03","date_gmt":"2016-02-24T08:28:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=274828"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=274828","title":{"rendered":"\u041a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c IPP FIR \u0444\u0438\u043b\u044c\u0442\u0440\u044b \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e"},"content":{"rendered":"<p>       \u0412 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 <a href=\"https:\/\/software.intel.com\/en-us\/intel-ipp\"> Intel Performance Primitives (IPP)<\/a>, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 8.2, \u043f\u043b\u0430\u043d\u043e\u043c\u0435\u0440\u043d\u043e \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043e\u0442 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u0440\u0430\u0441\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0432\u0430\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043a \u0432\u043d\u0435\u0448\u043d\u0435\u043c\u0443. \u041f\u0440\u0438\u0447\u0438\u043d\u044b \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438\u0437\u043b\u043e\u0436\u0435\u043d\u044b \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 <a href=\"https:\/\/habrahabr.ru\/company\/intel\/blog\/255931\">\u0424\u0443\u043d\u043a\u0446\u0438\u0438 IPP c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0431\u043e\u0440\u0434\u044e\u0440\u043e\u0432 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u043e\u0442\u043e\u043a\u0430\u0445<\/a>. \u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0435 \u0444\u0438\u043b\u044c\u0442\u0440 \u0441 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c \u043e\u0442\u043a\u043b\u0438\u043a\u043e\u043c \u2014 FIR \u0444\u0438\u043b\u044c\u0442\u0440 (Finite Impulse Response). <br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h1>FIR \u0444\u0438\u043b\u044c\u0442\u0440<\/h1>\n<p>  \u0424\u0438\u043b\u044c\u0442\u0440\u044b \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0432\u0430\u0436\u043d\u0435\u0439\u0448\u0438\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u0435\u0439 \u0432 \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432. \u0418, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 IPP \u0438\u043c\u0435\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u044d\u0442\u0438\u0445 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 FIR (finite impulse response) \u0444\u0438\u043b\u044c\u0442\u0440\u0430. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 FIR \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u043c\u043d\u043e\u0433\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0439 \u043b\u0438\u0442\u0435\u0440\u0430\u0442\u0443\u0440\u0435 \u0438\u043b\u0438 \u0432 \u0432\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438, \u043d\u043e \u0435\u0441\u043b\u0438 \u043a\u0440\u0430\u0442\u043a\u043e, \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u043b\u043e\u0432\u0430\u0445, \u0442\u043e FIR \u0444\u0438\u043b\u044c\u0442\u0440 \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u043c\u043d\u043e\u0436\u0430\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u043e\u0442\u0441\u0447\u0435\u0442\u043e\u0432 \u0438 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043e\u0442\u0441\u0447\u0435\u0442 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0438\u043c \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b, \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u044d\u0442\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043e\u0442\u0441\u0447\u0435\u0442 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430. \u0418\u043b\u0438 \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e: FIR \u0444\u0438\u043b\u044c\u0442\u0440 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0432\u0435\u043a\u0442\u043e\u0440\u0430 <b>X<\/b> \u0434\u043b\u0438\u043d\u043e\u0439 <b><i>N<\/i><\/b> \u043e\u0442\u0441\u0447\u0435\u0442\u043e\u0432 \u0432 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 <b>Y<\/b> \u0434\u043b\u0438\u043d\u043e\u0439 \u0442\u043e\u0436\u0435 <b><i>N<\/i><\/b> \u043e\u0442\u0441\u0447\u0435\u0442\u043e\u0432 \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f <b><i>K<\/i><\/b> \u043e\u0442\u0441\u0447\u0435\u0442\u043e\u0432 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0438\u043c <b><i>K<\/i><\/b> \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432 <b>H<\/b> \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c. \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432 <b><i>K<\/i><\/b> \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u043c \u0444\u0438\u043b\u044c\u0442\u0440\u0430. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/957\/900\/593\/957900593ece42b18d3232ca21ffaade.png\"\/><br \/>  <i>\u0420\u0438\u0441. 1. FIR \u0444\u0438\u043b\u044c\u0442\u0440<\/i><\/p>\n<p>  \u0417\u0434\u0435\u0441\u044c:<br \/>  <i>tapsLen<\/i> \u2014 \u044d\u0442\u043e \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0444\u0438\u043b\u044c\u0442\u0440\u0430, <br \/>  <i>numIters<\/i> \u2014 \u044d\u0442\u043e \u0434\u043b\u0438\u043d\u0430 \u0432\u0435\u043a\u0442\u043e\u0440\u0430. <br \/>  \u0420\u0438\u0441\u0443\u043d\u043e\u043a \u0432\u0437\u044f\u0442 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043d\u0430 IPP \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043d\u044f\u0442\u0430\u044f \u0432 IPP \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u043b\u043e\u0433\u0438\u044f.<br \/>  \u0412\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c FIR \u0444\u0438\u043b\u044c\u0442\u0440 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/fe2\/aa6\/c93\/fe2aa6c93a094ea4b6dfa05f3b15304f.png\"\/><br \/>  <i>\u0420\u0438\u0441. 2. FIR \u0444\u0438\u043b\u044c\u0442\u0440 \u0441\u0445\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438<\/i><\/p>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u0437\u0434\u0435\u0441\u044c \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0444\u0438\u043b\u044c\u0442\u0440\u0430 K \u0440\u0430\u0432\u0435\u043d 4 \u0438 \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u043c\u043d\u043e\u0436\u0430\u0435\u043c 4 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 h \u0444\u0438\u043b\u044c\u0442\u0440\u0430 \u043d\u0430 4 \u043e\u0442\u0441\u0447\u0435\u0442\u0430 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 x, \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0441\u0443\u043c\u043c\u0443 \u0432 \u043e\u0434\u0438\u043d \u043e\u0442\u0441\u0447\u0435\u0442 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0432\u0435\u043a\u0442\u043e\u0440\u0430 y. \u041e\u0442\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u0444\u0438\u043b\u044c\u0442\u0440\u0430 h[3],h[2],h[1],h[0] \u043b\u0435\u0436\u0430\u0442 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u043f\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044e \u043a x \u0438 y, \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u043e\u0431\u0449\u0435\u043f\u0440\u0438\u043d\u044f\u0442\u043e\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u043e\u0439 \u043d\u0430 \u0440\u0438\u0441. 1<\/p>\n<h1>\u041b\u0438\u043d\u0438\u044f \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438<\/h1>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 FIR \u0444\u0438\u043b\u044c\u0442\u0440 \u044d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u0430\u044f \u0441\u0432\u0435\u0440\u0442\u043a\u0430, \u0442\u043e \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u0434\u043b\u0438\u043d\u043e\u0439 \u0432 N \u043e\u0442\u0441\u0447\u0435\u0442\u043e\u0432, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e N+K-1 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u043e\u0442\u0441\u0447\u0435\u0442\u043e\u0432, \u0433\u0434\u0435 K \u0434\u043b\u0438\u043d\u0430 \u044f\u0434\u0440\u0430. \u041f\u0435\u0440\u0432\u044b\u0435 K-1 \u043e\u0442\u0441\u0447\u0435\u0442\u043e\u0432 \u0431\u0443\u0434\u0435\u043c \u0434\u0430\u043b\u0435\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u00ab\u043b\u0438\u043d\u0438\u0435\u0439 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438\u00bb (delay line). \u041d\u0430 \u0440\u0438\u0441. 2 \u043e\u043d\u0438 \u043d\u0443\u043c\u0435\u0440\u0443\u044e\u0442\u0441\u044f x[-3], x[-2], x[-1]. \u0414\u0430\u043d\u043d\u044b\u0435, \u043f\u043e\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0435 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043c\u0430, \u0432\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435 \u0447\u0435\u0433\u043e \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u0431\u0438\u0442\u044b\u043c\u0438 \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u044b\u0435 \u0431\u043b\u043e\u043a\u0438. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u0430\u0443\u0434\u0438\u043e \u0441\u0438\u0433\u043d\u0430\u043b, \u0442\u043e \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0431\u0443\u0444\u0435\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0442 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u0442\u043e \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u044c \u043f\u043e\u0440\u0446\u0438\u044f\u043c\u0438 \u043f\u043e \u043b\u0438\u043d\u0438\u0438 \u0441\u0432\u044f\u0437\u0438. \u0410 \u0442\u0430\u043a\u0436\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0431\u0443\u0444\u0435\u0440 \u0438 \u0432 \u0441\u0430\u043c\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u043e\u0431\u044a\u0435\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0431\u0443\u0444\u0435\u0440 \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u043a\u043e\u0439 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u044b \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u0443\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u0432 \u043a\u044d\u0448 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u0438 \u0442\u043e\u0433\u0434\u0430 \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442 \u0447\u0435\u0440\u0435\u0437 \u044d\u0442\u043e\u0442 \u0431\u0443\u0444\u0435\u0440 \u043f\u043e\u0440\u0446\u0438\u044f\u043c\u0438. \u0412\u043e \u0432\u0441\u0435\u0445 \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043b\u0438\u043d\u0438\u044f \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u0430. \u041e\u043d\u0430 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u00ab\u0441\u043a\u043b\u0435\u0438\u0442\u044c\u00bb \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043e\u0434\u0438\u043d \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043a\u0440\u0430\u0435\u0432\u043e\u0433\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0430 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0431\u043b\u043e\u043a\u0438. <\/p>\n<h1>IPP API<\/h1>\n<p>  \u041c\u043d\u043e\u0433\u043e\u043b\u0435\u0442\u043d\u0438\u0439 \u043e\u043f\u044b\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 IPP \u0432\u044b\u044f\u0432\u0438\u043b, \u0447\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c API FIR \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c:  <\/p>\n<ul>\n<li>\u0431\u044b\u043b\u0430 \u0431\u044b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0431\u043b\u043e\u043a\u0430\u043c\u0438;<\/li>\n<li>\u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u043e \u0431\u044b \u0441\u043a\u0440\u044b\u0442\u043e\u0435 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438;<\/li>\n<li>\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u043b\u0430\u0441\u044c \u0431\u044b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u0442\u043e\u043a\u0430\u0445;<\/li>\n<li>\u0431\u044b\u043b \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c in-place \u0440\u0435\u0436\u0438\u043c \u0442.\u0435 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u043c.<\/li>\n<\/ul>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0432\u0441\u0435 \u044d\u0442\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f, \u0431\u044b\u043b\u0438 \u0432\u0432\u0435\u0434\u0435\u043d\u044b \u043f\u043e\u043d\u044f\u0442\u0438\u044f \u201c\u0432\u0445\u043e\u0434\u043d\u043e\u0439\u201d \u0438 \u201c\u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439\u201d \u043b\u0438\u043d\u0438\u0439 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e API \u0441\u0442\u0430\u043b \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">API FIR \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">\/\/  Name:         ippsFIRSRGetSize, ippsFIRSRInit_32f, ippsFIRSRInit_64f \/\/                ippsFIRSR_32f, ippsFIRSR_64f \/\/  Purpose:      Get sizes of the FIR spec structure and temporary buffer \/\/                initialize FIR spec structure - set taps and delay line \/\/                perform FIR filtering \/\/  Parameters: \/\/      pTaps       - pointer to the filter coefficients \/\/      tapsLen     - number of coefficients \/\/      tapsType    - type of coefficients (ipp32f or ipp64f) \/\/      pSpecSize   - pointer to the size of FIR spec \/\/      pBufSize    - pointer to the size of temporal buffer \/\/      algType     - mask for the algorithm type definition (direct, fft, auto) \/\/      pDlySrc     - pointer to the input  delay line values, can be NULL \/\/      pDlyDst     - pointer to the output delay line values, can be NULL \/\/      pSpec       - pointer to the constant internal structure \/\/      pSrc        - pointer to the source vector. \/\/      pDst        - pointer to the destination vector \/\/      numIters    - length  of the destination vector \/\/      pBuf        - pointer to the work buffer \/\/   Return: \/\/      status      - status value returned, its value are \/\/         ippStsNullPtrErr       - one of the specified pointer is NULL \/\/         ippStsFIRLenErr        - tapsLen &lt;= 0 \/\/         ippStsContextMatchErr  - wrong state identifier \/\/         ippStsNoErr            - OK \/\/         ippStsSizeErr          - numIters is not positive \/\/         ippStsAlgTypeErr       - unsupported algorithm type \/\/         ippStsMismatch         - not effective algorithm. *\/  IppStatus ippsFIRSRGetSize (int tapsLen,  IppDataType tapsType ,  int* pSpecSize,  int* pBufSize ) IppStatus ippsFIRSRInit_32f( const Ipp32f* pTaps, int tapsLen, IppAlgType algType, IppsFIRSpec_32f* pSpec ) IppStatus ippsFIRSR_32f  (const Ipp32f*  pSrc, Ipp32f*  pDst, int numIters, IppsFIRSpec_32f*  pSpec, const Ipp32f*  pDlySrc, Ipp32f*  pDlyDst, Ipp8u* pBuf) <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u042d\u0442\u043e\u0442 API \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0441\u0445\u0435\u043c\u0435, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c\u043e\u0439 \u0432 IPP. \u0412\u043d\u0430\u0447\u0430\u043b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>ippsFIRSRGetSize<\/i> \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u043e\u0434 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0431\u0443\u0444\u0435\u0440. \u0414\u0430\u043b\u0435\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <i>ippsFIRSRInit<\/i>, \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u043e\u0434\u0430\u044e\u0442\u0441\u044f \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u0444\u0438\u043b\u044c\u0442\u0440\u0430. \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 pSpec, \u0443\u0441\u043a\u043e\u0440\u044f\u044e\u0449\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0438\u0440\u0443\u044e\u0449\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>ippsFIRSR<\/i>. \u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0447\u0442\u043e \u043e\u0442\u0440\u0430\u0436\u0435\u043d\u043e \u0432 \u0435\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0438 Spec, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043f\u043e\u0442\u043e\u043a\u0430\u043c\u0438, \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 pBuf \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0438 \u043c\u043e\u0434\u0438\u0446\u0438\u0444\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0431\u0443\u0444\u0435\u0440 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d \u0441\u0432\u043e\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0431\u0443\u0444\u0435\u0440. <\/p>\n<p>  \u0421\u0443\u0444\u0444\u0438\u043a\u0441 SR \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 single rate, \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0435\u0434\u0438\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u044f c MR (multi rate) \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u043c\u0438, \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u0435\u0442 \u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0446\u0435\u043b\u043e\u0439 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 numIters \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0437\u0430\u0438\u043c\u0441\u0442\u0432\u043e\u0432\u0430\u043d \u0438\u0437 MR \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432 \u0438 \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043b\u0438\u043d\u0443 \u0432\u0435\u043a\u0442\u043e\u0440\u0430.<br \/>  \u041d\u0430 \u043d\u0430\u0447\u0430\u043b\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430 x[0] \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 pSrc.<br \/>  \u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a\u043e\u0439 \u0441\u043c\u044b\u0441\u043b \u0432\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b pDlySrc \u0438 pDlyDst. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/1ac\/f88\/00c\/1acf8800cd2b45d399b257411a85bec0.png\"\/><br \/>  <i>\u0420\u0438\u0441. 3. \u00ab\u0412\u0445\u043e\u0434\u043d\u0430\u044f\u00bb \u0438 \u00ab\u0412\u044b\u0445\u043e\u0434\u043d\u0430\u044f\u00bb \u043b\u0438\u043d\u0438\u0438 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438<\/i><\/p>\n<p>  \u041a\u0430\u043a \u0443\u0436\u0435 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u043e\u0441\u044c \u0440\u0430\u043d\u0435\u0435, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0432 x[-3], x[-2], x[-1] \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0438\u0437 \u0444\u043e\u0440\u043c\u0443\u043b\u044b \u0441\u0432\u0435\u0440\u0442\u043a\u0438. \u042d\u0442\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u00ab\u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u043b\u0438\u043d\u0438\u0435\u0439 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438\u00bb pDlySrc. \u0410 \u043e\u0442\u0441\u0447\u0435\u0442\u044b x[N-3], x[N-2], x[N-1] \u044d\u0442\u043e \u00ab\u0445\u0432\u043e\u0441\u0442\u00bb \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0432\u0435\u043a\u0442\u043e\u0440\u0430, \u0442.\u0435. \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 K-1 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u041e\u043d\u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u00ab\u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u043b\u0438\u043d\u0438\u0435\u0439 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438\u00bb pDlyDst. \u0414\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u043e\u043d\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0431\u0443\u0434\u0443\u0442 \u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u043b\u0438\u043d\u0438\u0435\u0439 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<br \/>  \u0412\u0445\u043e\u0434\u043d\u0430\u044f \u043b\u0438\u043d\u0438\u044f \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 pDlySrc \u043c\u043e\u0436\u0435\u0442 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 k-1 \u043e\u0442\u0441\u0447\u0435\u0442\u043e\u0432 \u043b\u0435\u0432\u0435\u0435 x[0], \u043d\u0430 \u043a\u0430\u043a\u043e\u0439 \u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0439 \u0431\u0443\u0444\u0435\u0440 \u0438\u043b\u0438 \u0440\u0430\u0432\u043d\u044f\u0442\u044c\u0441\u044f NULL. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 NULL \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u043b\u0438\u043d\u0438\u0438 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u0440\u0430\u0432\u043d\u044b 0. \u042d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430, \u043a\u043e\u0433\u0434\u0430 \u0435\u0449\u0435 \u043d\u0435\u0442 \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u0432\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<br \/>  \u041f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 pDlyDst \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u00ab\u0445\u0432\u043e\u0441\u0442\u0430\u00bb \u0431\u043b\u043e\u043a\u0430, \u0442.\u0435. k-1 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u043e\u0442\u0441\u0447\u0435\u0442\u043e\u0432. \u0415\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0432\u043d\u043e NULL, \u0442\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f. <\/p>\n<p>  \u0422\u0430\u043a\u043e\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0438\u0437 \u0434\u0432\u0443\u0445 \u043b\u0438\u043d\u0438\u0439 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0441\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0432\u0435\u043a\u0442\u043e\u0440\u0430, \u0434\u0430\u0436\u0435 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 in-place \u0440\u0435\u0436\u0438\u043c\u0430, \u0442.\u0435. \u043a\u043e\u0433\u0434\u0430 \u0432\u0435\u043a\u0442\u043e\u0440 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u00ab\u0445\u0432\u043e\u0441\u0442\u044b\u00bb \u0431\u043b\u043e\u043a\u043e\u0432 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0431\u0443\u0444\u0435\u0440\u044b \u0438 \u043f\u043e\u0434\u0430\u0442\u044c \u0438\u0445 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u043b\u0438\u043d\u0438\u0438 \u0432 \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e\u0442\u043e\u043a. \u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e\u0433\u043e \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u0432 \u043a\u043e\u043d\u0446\u0435 \u0435\u0434\u0438\u043d\u044b\u043c \u043b\u0438\u0441\u0442\u0438\u043d\u0433\u043e\u043c. <\/p>\n<h1>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Lowpass IPP FIR \u0444\u0438\u043b\u044c\u0442\u0440\u0430.<\/h1>\n<p>   \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c IPP FIR \u0444\u0438\u043b\u044c\u0442\u0440 \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043b\u0438\u0448\u044c \u043d\u0438\u0437\u043a\u043e\u0447\u0430\u0441\u0442\u043e\u0442\u043d\u0443\u044e \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u044e\u044e \u0441\u0438\u0433\u043d\u0430\u043b\u0430.<br \/>  \u0414\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043d\u0435\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e IPP \u0444\u0443\u043d\u043a\u0446\u0438\u044e Jaehne, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0443\u044e \u0444\u043e\u0440\u043c\u0443\u043b\u0443<br \/>  <b>pDst[n] = magn * sin ((0.5\u03c0n2)\/len), 0 \u2264 n &lt; len<\/b><br \/>  \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043b\u043e\u0448\u0430\u0434\u043a\u043e\u0439, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043c\u043d\u043e\u0433\u0438\u0435 IPP \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u0438\u0433\u043d\u0430\u043b \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0432 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 .csv \u0444\u0430\u0439\u043b \u0438 \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0432 Excel. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0441\u0438\u0433\u043d\u0430\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/92b\/0a3\/669\/92b0a36699cd4aea864fadbc9fd341b9.jpg\"\/><br \/>  <i>\u0420\u0438\u0441. 4. 128 \u041e\u0442\u0441\u0447\u0435\u0442\u043e\u0432 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 Jaehne<\/i><\/p>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 \u0444\u0438\u043b\u044c\u0442\u0440 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 31. \u0414\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f IPP \u0444\u0443\u043d\u043a\u0446\u0438\u044f <i>ippsFIRGenLowpass_64f<\/i>. \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0432 double, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442\u0441\u044f \u0432 float. \u0421\u043c. \u043a\u043e\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>firgenlowpass()<\/i> \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438. \u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u0437\u043e\u0432\u0430 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u0443\u0444\u0435\u0440\u0430, \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438 \u0432\u044b\u0437\u043e\u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 ippsFIRSR, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0435\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c.<br \/>  \u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f lowpass \u0444\u0438\u043b\u044c\u0442\u0440\u0430 \u0432 \u0441\u0438\u0433\u043d\u0430\u043b\u0435 \u043e\u0441\u0442\u0430\u043b\u0430\u0441\u044c \u043d\u0438\u0437\u043a\u043e\u0447\u0430\u0441\u0442\u043e\u0442\u043d\u0430\u044f \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0430\u044f. \u041e\u0442\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u0444\u0430\u0437\u0430 \u0441\u0434\u0432\u0438\u043d\u0443\u0442\u0430, \u043d\u043e \u044d\u0442\u043e \u0443\u0436\u0435 \u0432\u044b\u0442\u0435\u043a\u0430\u0435\u0442 \u0438\u0437 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0441\u0430\u043c\u0438\u0445 FIR \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432 \u0438 \u043d\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a IPP \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/252\/11d\/49d\/25211d49da7848b7bdf261c9f99a2522.jpg\"\/><br \/>  <i>\u0420\u0438\u0441. 5. 128 \u041e\u0442\u0441\u0447\u0435\u0442\u043e\u0432 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 Jaehne \u043f\u043e\u0441\u043b\u0435 lowpass \u0444\u0438\u043b\u044c\u0442\u0440\u0430<\/i><\/p>\n<p>  \u041d\u0430 \u044d\u0442\u0438\u0445 \u0440\u0438\u0441\u0443\u043d\u043a\u0430\u0445 FIR \u0444\u0438\u043b\u044c\u0442\u0440 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 128 \u043e\u0442\u0441\u0447\u0435\u0442\u043e\u0432, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c 30 \u043e\u0442\u0441\u0447\u0435\u0442\u043e\u0432 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u043b\u0438\u043d\u0438\u0438 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u043c\u044b \u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c \u0440\u0430\u0432\u043d\u044b\u043c\u0438 0, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044f pDlySrc = NULL. \u0412\u044b\u0445\u043e\u0434\u043d\u0430\u044f \u043b\u0438\u043d\u0438\u044f \u043d\u0430\u043c \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u0430 pDlyDst = NULL.<\/p>\n<h1>\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438<\/h1>\n<p>  \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u043a\u0430 IPP \u0438\u043c\u0435\u0435\u0442 \u0432 \u0441\u0432\u043e\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0438 \u0441\u043b\u043e\u0432\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c (performance), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438 \u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f \u0432\u043e \u0433\u043b\u0430\u0432\u0443 \u0443\u0433\u043b\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c <i>ippFIRSR<\/i> \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0435 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 AVX2. \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u044b\u0439 \u043a\u043e\u0434, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439 OpenMP \u043f\u043e\u043c\u0435\u0440\u044f\u0435\u043c \u0435\u0433\u043e \u0438 \u043f\u043e\u0441\u043b\u0435 \u0441\u0432\u0435\u0434\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0439 \u0432 \u043e\u0434\u0438\u043d \u0433\u0440\u0430\u0444\u0438\u043a.<br \/>  API FIR \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b\u0441\u044f \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0438 \u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u0442\u0430\u043a, \u043a\u0430\u043a \u044d\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/e8d\/9f4\/609\/e8d9f4609816459da005bb8e6cb0a66b.jpg\"\/><br \/>  <i>\u0420\u0438\u0441. 6. \u0420\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u0442\u043e\u043a\u0430\u043c\u0438<\/i><\/p>\n<p>  \u041f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u0442\u043e\u043a\u0430\u043c\u0438, \u0441\u043c. \u0444\u0443\u043d\u043a\u0446\u0438\u044e fir_omp.   <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 fir_omp<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\"> void fir_omp(Ipp32f* src, Ipp32f* dst, int len, int order, IppsFIRSpec_32f* pSpec, Ipp32f* pDlySrc, Ipp32f* pDlyDst, Ipp8u* pBuffer) {     int  tlen, ttail;     tlen  = len \/ NTHREADS;     ttail = len % NTHREADS;     #pragma omp parallel num_threads(NTHREADS)      {         int id = omp_get_thread_num();         Ipp32f* s = src + id*tlen;         Ipp32f* d = dst + id*tlen;         int len = tlen + ((id == NTHREADS-1) ? ttail : 0);         Ipp8u* b = pBuffer + id*bufSize;           if (id == 0)             ippsFIRSR_32f(s, d, len, pSpec, pDlySrc, NULL, b);         else if (id == NTHREADS - 1)             ippsFIRSR_32f(s, d, len, pSpec, s - (order - 1), pDlyDst, b);         else             ippsFIRSR_32f(s, d, len, pSpec, s - (order - 1), NULL, b);     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434. \u0418\u0442\u0430\u043a, \u043a \u043d\u0430\u043c \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u043b\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u0430\u044f \u043f\u043e\u0440\u0446\u0438\u044f \u0441\u0438\u0433\u043d\u0430\u043b\u0430 x[0],\u2026,x[N-1], \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u043c, \u0430 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043d\u0435\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0432\u0445\u043e\u0434\u043d\u0443\u044e \u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u0443\u044e \u043b\u0438\u043d\u0438\u0438 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u00ab\u0445\u0432\u043e\u0441\u0442\u00bb \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u043f\u043e\u0440\u0446\u0438\u0438 \u0438 \u0431\u0443\u0444\u0435\u0440, \u043a\u0443\u0434\u0430 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u201c\u0445\u0432\u043e\u0441\u0442\u201d \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043f\u043e\u0440\u0446\u0438\u0438. \u041c\u044b \u0445\u043e\u0442\u0438\u043c \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u0438 \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u044d\u0442\u043e\u0439 \u043f\u043e\u0440\u0446\u0438\u0438 \u043d\u0430 T=NTHREADS \u0431\u043b\u043e\u043a\u043e\u0432, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u0447\u0438\u0441\u043b\u0443 \u043f\u043e\u0442\u043e\u043a\u043e\u0432. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u043b\u0438\u043d\u0438\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0431\u0443\u0444\u0435\u0440 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430.<\/p>\n<p>  \u0414\u043b\u044f 0-\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u0432\u0445\u043e\u0434\u043d\u0430\u044f \u043b\u0438\u043d\u0438\u044f \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 <i>ippsFIRSR<\/i> \u044d\u0442\u043e \u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 \u00ab\u0445\u0432\u043e\u0441\u0442\u00bb \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u043f\u043e\u0440\u0446\u0438\u0438, \u0430 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u043b\u0438\u043d\u0438\u0438 \u043f\u043e\u0434\u0430\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0431\u043b\u043e\u043a \u0441\u043c\u0435\u0449\u0435\u043d\u043d\u044b\u0439 \u043d\u0430 order-1 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u0418 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043f\u043e\u0442\u043e\u043a \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u00ab\u0445\u0432\u043e\u0441\u0442\u00bb \u043f\u043e\u0440\u0446\u0438\u0438. <\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442 \u0447\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443 \u0447\u0435\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0436\u0435 \u0435\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0430\u043d\u044b, \u0442\u043e \u043b\u0438\u043d\u0438\u0438 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0431\u0443\u0444\u0435\u0440\u044b.<\/p>\n<p>  \u041d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043e\u0434\u043d\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0439 \u0438 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0434\u043b\u044f 4-\u0445 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0444\u0438\u043b\u044c\u0442\u0440\u0430 31 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0435 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 AVX2 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 Intel&reg; Core(TM) i7-4770K 3.50Ghz. \u0414\u043b\u044f FIR \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0435\u0434\u0438\u043d\u0438\u0446\u0430 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f cpMAC, \u0442.\u0435. \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u0430\u043a\u0442\u043e\u0432 \u043d\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u0423\u043c\u043d\u043e\u0436\u0438\u0442\u044c+\u0421\u043b\u043e\u0436\u0438\u0442\u044c<br \/>   cpMAC = (\u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438) \/ (\u0434\u043b\u0438\u043d\u0430 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 * \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0444\u0438\u043b\u044c\u0442\u0440\u0430)<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/34d\/8cf\/e1d\/34d8cfe1d66846d08ee1800e20b54d2d.jpg\"\/><br \/>  <i>\u0420\u0438\u0441. 7. \u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043e\u0434\u043d\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0439 \u0438 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0439 FIR \u0444\u0438\u043b\u044c\u0442\u0440\u0430<\/i><\/p>\n<p>  \u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u0438 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432 3.7 \u0440\u0430\u0437 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043d\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043b\u0438\u043d\u043d\u044b\u0445 \u0432\u0435\u043a\u0442\u043e\u0440\u0430\u0445, \u0447\u0435\u043c \u043e\u0434\u043d\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u0430\u044f, \u0447\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 4 \u043f\u043e\u0442\u043e\u043a\u0430\u043c. \u041a\u0440\u0438\u0442\u0435\u0440\u0438\u0439 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043e\u0434\u043d\u043e- \u0438 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 \u0442\u0435\u043f\u0435\u0440\u044c, \u0441 \u043d\u043e\u0432\u044b\u043c API, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e, \u0433\u0434\u0435 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0439 \u0431\u044b\u043b \u0436\u0435\u0441\u0442\u043a\u043e \u0437\u0430\u0448\u0438\u0442 \u0432 \u043a\u043e\u0434 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u043b\u0430\u0441\u044c \u0438\u0437\u043d\u0443\u0442\u0440\u0438.<\/p>\n<h1>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 direct \u0438 FFT \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439<\/h1>\n<p>   \u0412 \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 \u0448\u0438\u0440\u043e\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u0437\u0430\u0438\u043c\u043d\u043e\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0441\u0432\u0435\u0440\u0442\u043a\u0438 \u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0424\u0443\u0440\u044c\u0435. <br \/>  IPP FIR \u0444\u0438\u043b\u044c\u0442\u0440\u044b \u043f\u043e\u043c\u0438\u043c\u043e \u043f\u0440\u044f\u043c\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043c\u0435\u044e\u0442 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0447\u0435\u0440\u0435\u0437 FFT, \u043f\u0440\u0438\u0447\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c\u044b\u0435 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c cpMAC \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u044f\u0442 \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0443\u044e \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e cpu \u0438 \u043f\u0440\u044f\u043c\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430, \u043e \u0447\u0435\u043c \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u0438\u0448\u0443\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043d\u0430 \u0444\u043e\u0440\u0443\u043c\u0430\u0445, \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e \u043f\u043e\u043b\u0430\u0433\u0430\u044f, \u0447\u0442\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0438\u0434\u0443\u0442 \u0447\u0435\u0440\u0435\u0437 FFT.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0430\u043a\u043e\u0439 \u0442\u0438\u043f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u043e \u0438\u0437 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 algType \u2014 ippAlgDirect ippAlgFFT, ippAlgAuto. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c\u0443 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044e \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0433\u043e cpu, \u0430 \u043e\u043d \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c. <\/p>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0430 \u0442\u043e\u043c \u0436\u0435 CPU \u0444\u0438\u043b\u044c\u0442\u0440\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432 \u0434\u043b\u044f \u0434\u043b\u0438\u043d\u044b \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u0432 1024 \u0438 128 \u043e\u0442\u0441\u0447\u0435\u0442\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u0440\u044f\u043c\u043e\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0438 FFT \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/aae\/928\/b4d\/aae928b4df204463926ee5de3df5aebd.jpg\"\/><br \/>  <i>\u0420\u0438\u0441. 8. \u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 direct \u0438 fft \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0434\u043b\u044f \u0434\u043b\u0438\u043d\u044b \u0432 1024 \u043e\u0442\u0441\u0447\u0435\u0442\u0430<\/i><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/47f\/13d\/6e4\/47f13d6e4d0944d5b5189db773d0a99e.jpg\"\/><br \/>  <i>\u0420\u0438\u0441. 9. \u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 direct \u0438 fft \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0434\u043b\u044f \u0434\u043b\u0438\u043d\u044b \u0432 128 \u043e\u0442\u0441\u0447\u0435\u0442\u043e\u0432<\/i><\/p>\n<p>  \u0414\u043b\u044f FFT \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u044b \u0441\u0442\u0443\u043f\u0435\u043d\u044c\u043a\u0438. \u042d\u0442\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u0434\u043b\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0431\u043b\u0438\u0437\u043a\u0438\u0445 \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f FFT \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430, \u0430 \u043a\u043e\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u043e\u0440\u044f\u0434\u043e\u043a FFT, \u0442\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f. \u0414\u043b\u044f \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043b\u0435\u0436\u0438\u0442 \u043d\u0438\u0436\u0435 \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0439 API \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043d\u0430 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u043e\u0431\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430, \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0443\u044e \u0438\u0437 \u043d\u0438\u0445. \u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0431\u0443\u0434\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u041d\u0430 \u044d\u0442\u043e\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435 \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u043d\u043e \u0434\u0432\u0443\u043c\u0435\u0440\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 1024&#215;1024, \u0433\u0434\u0435 \u043f\u043e \u043e\u0441\u0438 X \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0444\u0438\u043b\u044c\u0442\u0440\u0430, \u0430 \u043f\u043e \u043e\u0441\u0438 Y \u0434\u043b\u0438\u043d\u0430 \u0432\u0435\u043a\u0442\u043e\u0440\u0430. \u0417\u0435\u043b\u0435\u043d\u044b\u0439 \u0446\u0432\u0435\u0442 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0447\u0442\u043e fft \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043f\u0440\u044f\u043c\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438. \u0425\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u044b\u0435 \u043f\u0440\u044f\u043c\u044b\u0435 \u043b\u0438\u043d\u0438\u0438 \u0432\u043d\u0438\u0437\u0443 \u0440\u0438\u0441\u0443\u043d\u043a\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0440\u0438\u0441. 9, \u0433\u0434\u0435 fft \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435, \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u043e\u0440\u044f\u0434\u043e\u043a.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/78d\/a6c\/c7f\/78da6cc7f9324ea9809d7212485a56df.jpg\"\/><br \/>  <i>\u0420\u0438\u0441. 10. \u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 direct \u0438 fft \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 IPP FIR float \u0444\u0438\u043b\u044c\u0442\u0440\u0430 \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 filter order X vector length \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c\u044e 1024 x 1024<\/i><\/p>\n<p>  \u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0440\u0438\u0441\u0443\u043d\u043e\u043a \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u0438 \u0435\u0433\u043e \u043d\u0435 \u0442\u0430\u043a \u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0438 IPP \u043f\u043e\u0434 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u0443\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435, \u044d\u0442\u043e \u0440\u0438\u0441\u0443\u043d\u043e\u043a \u043c\u043e\u0436\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435. \u041f\u043e\u043c\u0438\u043c\u043e \u0432\u044b\u0431\u043e\u0440\u0430 \u043c\u0435\u0436\u0434\u0443 direct \u0438 fft \u043a\u043e\u0434\u043e\u043c, \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u043d\u0443 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c \u0432 \u0432\u0438\u0434\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0438 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0443\u0436\u0435 \u043c\u043d\u043e\u0433\u043e\u0441\u043b\u043e\u0439\u043d\u0430\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0439 API \u043e\u043f\u044f\u0442\u044c \u0436\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0438 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435. <\/p>\n<h1>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h1>\n<p>  \u0412\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0432 IPP 9.0 API FIR \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u0435\u0449\u0435 \u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e, \u0432\u044b\u0431\u0438\u0440\u0430\u044f \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u044f\u043c\u044b\u043c \u0438 fft \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u043c\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0430\u0440\u0430\u043b\u0435\u043b\u043b\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 IPP \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430 \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0434\u043b\u044f \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u043f\u043e \u044d\u0442\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0435 <a href=\"https:\/\/software.intel.com\/en-us\/intel-ipp\"> Intel Performance Primitives (IPP). <\/a><br \/>  \u2003  <\/p>\n<h1>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430, \u0438\u0437\u043c\u0435\u0440\u044f\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c IPP FIR \u0444\u0438\u043b\u044c\u0442\u0440\u0430<\/h1>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u043f\u0440\u0438\u043c\u0435\u0440\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">  #include &lt;stdio.h&gt; #include &lt;math.h&gt; #include &lt;omp.h&gt;   #include &quot;ippcore.h&quot; #include &quot;ipps.h&quot; #include &quot;bmp.h&quot; void save_csv(Ipp32f* pSrc, int len, char* fName) {     FILE *fp;     int i;   if((fp=fopen(fName, &quot;w&quot;))==NULL) {     printf(&quot;Cannot open %s\\n&quot;, fName);     return;   }   for (i = 0; i &lt; len; i++){       fprintf(fp, &quot;%.3f\\n&quot;, pSrc[i]);   }   fclose(fp); }   Ipp32f* pSrc; Ipp32f* pDft; Ipp32f* pDst; Ipp32f* pTaps; Ipp64f rFreq = 0.2; int bufSize; int NTHREADS = 1; IppAlgType algType = ippAlgDirect;   void firgenlowpass(int order) {     IppStatus status;     Ipp8u* pBuffer;     Ipp64f* pTaps_64f;     int size;     int i;     status    = ippsFIRGenGetBufferSize(order, &size);     pBuffer   = ippsMalloc_8u(size);     pTaps_64f = ippsMalloc_64f(order);     ippsFIRGenLowpass_64f(rFreq, pTaps_64f, order, ippWinBartlett, ippTrue, pBuffer);          for (i = 0; i &lt; order;i++) {         pTaps[i] = pTaps_64f[i];     }     ippsFree(pTaps_64f);     }      void fir_omp(Ipp32f* src, Ipp32f* dst, int len, int order, IppsFIRSpec_32f* pSpec, Ipp32f* pDlySrc, Ipp32f* pDlyDst, Ipp8u* pBuffer) {     int  tlen, ttail;     tlen  = len \/ NTHREADS;     ttail = len % NTHREADS;     #pragma omp parallel num_threads(NTHREADS)      {         int id = omp_get_thread_num();         Ipp32f* s = src + id*tlen;         Ipp32f* d = dst + id*tlen;         int len = tlen + ((id == NTHREADS-1) ? ttail : 0);         Ipp8u* b = pBuffer + id*bufSize;           if (id == 0)             ippsFIRSR_32f(s, d, len, pSpec, pDlySrc, NULL, b);         else if (id == NTHREADS - 1)             ippsFIRSR_32f(s, d, len, pSpec, s - (order - 1), pDlyDst, b);         else             ippsFIRSR_32f(s, d, len, pSpec, s - (order - 1), NULL, b);     } }   void perf(int len, int order, float* cpMAC) {     IppStatus status;     IppsFIRSpec_32f* pSpec;     Ipp8u* pBuffer;     int specSize;       Ipp32f*  pDlySrc = NULL;\/*initialize delay line with &quot;0&quot;*\/     Ipp32f*  pDlyDst = NULL;\/*don't write  output delay line*\/     __int64 beg=0, end=0;     int i, loop = 10000;          \/*allocate memory for input and output vectors*\/     pSrc  = ippsMalloc_32f(len);     pDst  = ippsMalloc_32f(len);     pTaps = ippsMalloc_32f(order);          \/*create special vector Jaehne*\/     ippsVectorJaehne_32f(pSrc, len, 128);          \/*get lowpass filter coeffs*\/     firgenlowpass(order);          \/*get necessary buffer sizes for pSpec and for pBuffer*\/     status  = ippsFIRSRGetSize(order, ipp32f, &specSize, &bufSize);          \/*allocate memory for pSpec*\/     pSpec   = (IppsFIRSpec_32f*)ippsMalloc_8u(specSize);          \/*for N threads bufSize should be multiplied by N*\/     \/*allocate bufSize*NTHREADS bytes*\/     pBuffer =                     ippsMalloc_8u(bufSize*NTHREADS);          \/*initalize pSpec*\/     status = ippsFIRSRInit_32f(pTaps, order, algType, pSpec);          \/*apply FIR filter*\/     \/*start measurement for sinle threaded*\/     if (NTHREADS == 1){         ippsFIRSR_32f(pSrc, pDst, len, pSpec, pDlySrc, pDlyDst, pBuffer);         beg = __rdtsc();         for (int i = 0; i &lt; loop; i++) {             ippsFIRSR_32f(pSrc, pDst, len, pSpec, pDlySrc, pDlyDst, pBuffer);         }         end = __rdtsc();     }     else {         fir_omp(pSrc, pDst, len, order, pSpec, pDlySrc, pDlyDst, pBuffer);         beg = __rdtsc();         for (int i = 0; i &lt; loop; i++) {             fir_omp(pSrc, pDst, len, order, pSpec, pDlySrc, pDlyDst, pBuffer);         }         end = __rdtsc();       }     *cpMAC = ((double)(end - beg) \/ ((double)loop * (double)len * (double)order));      printf(&quot;%5d, %5d,   %3.3f\\n&quot;, len, order, *cpMAC);      ippsFree(pSrc);     ippsFree(pDst);     ippsFree(pTaps);     ippsFree(pSpec);     ippsFree(pBuffer);   }  int main() {     int len = 32768;     int order;     float cpMAC;     NTHREADS = 1;     algType = ippAlgDirect;     \/\/algType = ippAlgFFT;     len = 128;     printf(&quot;\\nthreads: %d\\n&quot;, NTHREADS);     printf(&quot;len,   order,   cpMAC\\n\\n&quot;);     for (order = 1; order &lt;= 512; order++){         perf(len, order, &cpMAC);     }     return 0; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/276687\/\"> https:\/\/habrahabr.ru\/post\/276687\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u0412 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 <a href=\"https:\/\/software.intel.com\/en-us\/intel-ipp\"> Intel Performance Primitives (IPP)<\/a>, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 8.2, \u043f\u043b\u0430\u043d\u043e\u043c\u0435\u0440\u043d\u043e \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043e\u0442 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u0440\u0430\u0441\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0432\u0430\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043a \u0432\u043d\u0435\u0448\u043d\u0435\u043c\u0443. \u041f\u0440\u0438\u0447\u0438\u043d\u044b \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438\u0437\u043b\u043e\u0436\u0435\u043d\u044b \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 <a href=\"https:\/\/habrahabr.ru\/company\/intel\/blog\/255931\">\u0424\u0443\u043d\u043a\u0446\u0438\u0438 IPP c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0431\u043e\u0440\u0434\u044e\u0440\u043e\u0432 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u043e\u0442\u043e\u043a\u0430\u0445<\/a>. \u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0435 \u0444\u0438\u043b\u044c\u0442\u0440 \u0441 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c \u043e\u0442\u043a\u043b\u0438\u043a\u043e\u043c \u2014 FIR \u0444\u0438\u043b\u044c\u0442\u0440 (Finite Impulse Response).   <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-274828","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/274828","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=274828"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/274828\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=274828"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=274828"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=274828"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}