<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ippStaticInit called multiple times in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippStaticInit-called-multiple-times/m-p/895674#M12044</link>
    <description>&lt;P&gt;Please review these KB articles for some more info regarding ippInit():&lt;/P&gt;
&lt;P&gt;&lt;A href="http://software.intel.com/en-us/articles/intel-integrated-performance-primitives-intel-ipp-understanding-cpu-optimized-code-used-in-intel-ipp/"&gt;Understanding CPU Dispatching in the Intel IPP Library&lt;/A&gt;&lt;A href="http://software.intel.com/en-us/articles/ipp-dispatcher-control-functions-ippinit-functions/"&gt; &lt;/A&gt;&lt;BR /&gt;&lt;A href="http://software.intel.com/en-us/articles/ipp-dispatcher-control-functions-ippinit-functions/"&gt;IPP Dispatcher Control Functions - ipp*Init*() functions&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You should use the ippInit() function, ippStaticInit() is deprecated and will be removed in a future version of the library.&lt;/P&gt;
&lt;P&gt;In general, you only need to make the ippInit() call once in your application, preferrably before all other IPP calls and not during any other IPP calls. If all your threads are within the same application (they share the same code and data space) then only one call needs to be made, not one per thread.&lt;/P&gt;
&lt;P&gt;Separate applications, with separate copies of the library (i.e., distinct code and data space) need to make their own call to the library. That is, a call to ippInit() by application A to the library does not initialize the library for application B. Each application must make its own initialization call.&lt;/P&gt;
&lt;P&gt;Shared libraries (DLL/SO) make the initialization call automatically, at load time. Thus, a call to ippInit() for a dynamically linked IPP application is redundant but not harmful.&lt;/P&gt;
&lt;P&gt;At this time a call to ippInit() only initializes the dispatcher, so you can probably call it multiple times without any significant issues, although it could clear the dispatch table before resetting it (I don't know exactly), so you could have a window of time in which the dispatch table sends you to the non-optimized functions if you make a call to ippInit() at the same time as another IPP function.&lt;/P&gt;
&lt;P&gt;So, in sum, best to just call the function once, per process.&lt;/P&gt;
&lt;P&gt;Paul&lt;/P&gt;</description>
    <pubDate>Fri, 12 Feb 2010 23:52:00 GMT</pubDate>
    <dc:creator>PaulF_IntelCorp</dc:creator>
    <dc:date>2010-02-12T23:52:00Z</dc:date>
    <item>
      <title>ippStaticInit called multiple times</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippStaticInit-called-multiple-times/m-p/895666#M12036</link>
      <description>Is it safe to call ippStaticInit function while another IPP function is working? For example: if multiple threads initialize IPP separately, and one of the threads is already initialized and started processing, while another one starts initializing IPP for itself.&lt;BR /&gt;&lt;BR /&gt;For the sake of the experiment, let's assume that moving the initialization code to the main application thread is not an option.&lt;BR /&gt;</description>
      <pubDate>Thu, 28 Aug 2008 09:04:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ippStaticInit-called-multiple-times/m-p/895666#M12036</guid>
      <dc:creator>aad_rijnberg</dc:creator>
      <dc:date>2008-08-28T09:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: ippStaticInit called multiple times</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippStaticInit-called-multiple-times/m-p/895667#M12037</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;IPP manual, volume 1, Chapter 3, page 3-16&lt;/P&gt;&lt;B&gt;&lt;FONT face="Verdana,Bold" size="1"&gt;
&lt;P align="left"&gt;CAUTION. &lt;/P&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT face="Verdana" size="1"&gt;You can not use any other Intel IPP function while the function &lt;/FONT&gt;&lt;FONT face="Courier" size="2"&gt;ippStaticInit &lt;/FONT&gt;&lt;FONT face="Verdana" size="1"&gt;continues execution.&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;Regards,&lt;BR /&gt; Vladimir&lt;/P&gt;</description>
      <pubDate>Fri, 29 Aug 2008 05:40:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ippStaticInit-called-multiple-times/m-p/895667#M12037</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2008-08-29T05:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: ippStaticInit called multiple times</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippStaticInit-called-multiple-times/m-p/895668#M12038</link>
      <description>Sorry for being meticulous but this quote lacks the context. It is taken from the section, which says that ippStaticInit() should be called first, before any other IPP function. And then this caution. This leaves you wonder if the caution is about the first call of  ippStaticInit() or any call.&lt;BR /&gt;&lt;BR /&gt;For example, one can imagine that on the first call ippStaticInit() initializes the dispatcher and on subsequent calls it returns without doing anything of importance.&lt;BR /&gt;</description>
      <pubDate>Fri, 29 Aug 2008 17:36:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ippStaticInit-called-multiple-times/m-p/895668#M12038</guid>
      <dc:creator>panone</dc:creator>
      <dc:date>2008-08-29T17:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: ippStaticInit called multiple times</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippStaticInit-called-multiple-times/m-p/895669#M12039</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;you are right. The description is not sufficient. You need to take care that no other threads in your application are calling IPP functions when you call IPP static dispatcher (ippStaticInit) because it modifies some internalfunction table.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt; Vladimir&lt;/P&gt;</description>
      <pubDate>Wed, 03 Sep 2008 13:24:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ippStaticInit-called-multiple-times/m-p/895669#M12039</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2008-09-03T13:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: ippStaticInit called multiple times</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippStaticInit-called-multiple-times/m-p/895670#M12040</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;
&lt;P&gt;It is enough to call ippStaticInit() once per each thread (we are using 3 threads) wheneach thread is created or it is needed to call ippStaticInit() before each ipp function ineach thread? I am asking because it is not clear for me.&lt;/P&gt;
&lt;P&gt;What is the best scenarioto use dispatchingvia ippStaticInit() in multithreaded application where ipp functions are used in all threads? We are using IPP version 6.1.1.035.&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;
&lt;P&gt;Viktor.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2010 17:25:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ippStaticInit-called-multiple-times/m-p/895670#M12040</guid>
      <dc:creator>kosicevk_upjs_sk</dc:creator>
      <dc:date>2010-02-11T17:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: ippStaticInit called multiple times</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippStaticInit-called-multiple-times/m-p/895671#M12041</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;in typical scenario you need to call ippStaticInit only once. Usually it is done in beginning of application. The call of ippStaticInit will configure global IPP dispatching table, so any IPP functions called after that from any thread will use appropriate cpu-specific code.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt; Vladimir&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2010 04:57:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ippStaticInit-called-multiple-times/m-p/895671#M12041</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2010-02-12T04:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: ippStaticInit called multiple times</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippStaticInit-called-multiple-times/m-p/895672#M12042</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;if ippStaticInit only update the dispatch table, wouldn't each element be updated atomically ? If this is the case then, it shouldn't matter if ipp functions are called when calling again ippStaticInit from a different thread. Of course, there might be other critical data I'm not aware of.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Matthieu&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2010 08:37:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ippStaticInit-called-multiple-times/m-p/895672#M12042</guid>
      <dc:creator>matthieu_darbois</dc:creator>
      <dc:date>2010-02-12T08:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: ippStaticInit called multiple times</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippStaticInit-called-multiple-times/m-p/895673#M12043</link>
      <description>&lt;P&gt;Doesn't ippStaticInit() need to be called once per module? I tend to call it in DllMain and in the application.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Peter&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2010 15:48:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ippStaticInit-called-multiple-times/m-p/895673#M12043</guid>
      <dc:creator>pvonkaenel</dc:creator>
      <dc:date>2010-02-12T15:48:30Z</dc:date>
    </item>
    <item>
      <title>Re: ippStaticInit called multiple times</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippStaticInit-called-multiple-times/m-p/895674#M12044</link>
      <description>&lt;P&gt;Please review these KB articles for some more info regarding ippInit():&lt;/P&gt;
&lt;P&gt;&lt;A href="http://software.intel.com/en-us/articles/intel-integrated-performance-primitives-intel-ipp-understanding-cpu-optimized-code-used-in-intel-ipp/"&gt;Understanding CPU Dispatching in the Intel IPP Library&lt;/A&gt;&lt;A href="http://software.intel.com/en-us/articles/ipp-dispatcher-control-functions-ippinit-functions/"&gt; &lt;/A&gt;&lt;BR /&gt;&lt;A href="http://software.intel.com/en-us/articles/ipp-dispatcher-control-functions-ippinit-functions/"&gt;IPP Dispatcher Control Functions - ipp*Init*() functions&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You should use the ippInit() function, ippStaticInit() is deprecated and will be removed in a future version of the library.&lt;/P&gt;
&lt;P&gt;In general, you only need to make the ippInit() call once in your application, preferrably before all other IPP calls and not during any other IPP calls. If all your threads are within the same application (they share the same code and data space) then only one call needs to be made, not one per thread.&lt;/P&gt;
&lt;P&gt;Separate applications, with separate copies of the library (i.e., distinct code and data space) need to make their own call to the library. That is, a call to ippInit() by application A to the library does not initialize the library for application B. Each application must make its own initialization call.&lt;/P&gt;
&lt;P&gt;Shared libraries (DLL/SO) make the initialization call automatically, at load time. Thus, a call to ippInit() for a dynamically linked IPP application is redundant but not harmful.&lt;/P&gt;
&lt;P&gt;At this time a call to ippInit() only initializes the dispatcher, so you can probably call it multiple times without any significant issues, although it could clear the dispatch table before resetting it (I don't know exactly), so you could have a window of time in which the dispatch table sends you to the non-optimized functions if you make a call to ippInit() at the same time as another IPP function.&lt;/P&gt;
&lt;P&gt;So, in sum, best to just call the function once, per process.&lt;/P&gt;
&lt;P&gt;Paul&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2010 23:52:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ippStaticInit-called-multiple-times/m-p/895674#M12044</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2010-02-12T23:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: ippStaticInit called multiple times</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippStaticInit-called-multiple-times/m-p/895675#M12045</link>
      <description>&lt;P&gt;Thanks for pointing this out - as of Intel C++ Pro 11.1.054, the IPP user's guide still lists ippStaticInit() andthe the Signal Processing manual does not yet mention that ippStaticInit is depricated (but it does list the new ippInit() call).&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Also, when statically linking with IPP, when did it no longer become necessary to call ipp*Init() within a DLL? The last time I tested (probably back in IPP 6.0) DLLs statically linked with IPP needed to call ipp*Init().&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Peter&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Feb 2010 18:54:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ippStaticInit-called-multiple-times/m-p/895675#M12045</guid>
      <dc:creator>pvonkaenel</dc:creator>
      <dc:date>2010-02-16T18:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: ippStaticInit called multiple times</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippStaticInit-called-multiple-times/m-p/895676#M12046</link>
      <description>&lt;P&gt;Peter,&lt;/P&gt;
&lt;P&gt;If you create a DLL that uses the IPP static libraries then you&lt;EM&gt;DO&lt;/EM&gt; need to make the ippInit() call. The only place where the call is taken care of for you is in the standard DLL files that are pre-built and provided with the library. Custom DLL files still need to take care of this issue (in essence, any code that calls a static version of the IPP library). We've already done just that in the DLL form of the library that is provided as part of the product.&lt;/P&gt;
&lt;P&gt;Sorry about that confusion,&lt;/P&gt;
&lt;P&gt;Paul&lt;/P&gt;
&lt;P&gt;p.s. The fact that ippStaticInit() is not marked as deprecated in the documentation is a mistake. ippInit() is the call to use and replaces ippStaticInit().&lt;/P&gt;</description>
      <pubDate>Tue, 16 Feb 2010 19:24:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ippStaticInit-called-multiple-times/m-p/895676#M12046</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2010-02-16T19:24:25Z</dc:date>
    </item>
    <item>
      <title>Quote:Paul F. (Intel) wrote</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippStaticInit-called-multiple-times/m-p/895677#M12047</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Paul F. (Intel) wrote:&lt;BR /&gt;At this time a call to ippInit() only initializes the dispatcher, so you can probably call it multiple times without any significant issues, although it could clear the dispatch table before resetting it (I don't know exactly), so you could have a window of time in which the dispatch table sends you to the non-optimized functions if you make a call to ippInit() at the same time as another IPP function.&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this still true with the latest version of library?&lt;/P&gt;&lt;P&gt;I'm making a DLL, which include ipp.h, and I&amp;nbsp;&lt;EM&gt;Single-threaded Static Library&amp;nbsp;&lt;/EM&gt;the IPP library. I was reading &lt;A href="https://software.intel.com/en-us/ipp-dev-reference-init"&gt;this&lt;/A&gt;, which says:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NOTE You can not use any other Intel IPP function while the function&amp;nbsp;ippInit&amp;nbsp;continues execution.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;So, it sounds to me that if ippInit() is running (in a multi-thread context process), another IPP function can't run. Am I right? Are ippInit thread safe now?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or I still need to make ippInit() call before any other calls?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 29 Nov 2018 08:16:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ippStaticInit-called-multiple-times/m-p/895677#M12047</guid>
      <dc:creator>markzzz</dc:creator>
      <dc:date>2018-11-29T08:16:49Z</dc:date>
    </item>
    <item>
      <title>Hello Markzzz,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippStaticInit-called-multiple-times/m-p/895678#M12048</link>
      <description>&lt;P&gt;Hello Markzzz,&lt;/P&gt;&lt;P&gt;it depends on which version IPP&amp;nbsp;you use. Starting from IPP 2018 dispatch mechanism works automatically. In any case for double-safe I recommend you to call ippInit() before parallel region, just in start of the application.&lt;/P&gt;&lt;P&gt;Pavel&lt;/P&gt;</description>
      <pubDate>Thu, 29 Nov 2018 08:57:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ippStaticInit-called-multiple-times/m-p/895678#M12048</guid>
      <dc:creator>Pavel_B_Intel1</dc:creator>
      <dc:date>2018-11-29T08:57:50Z</dc:date>
    </item>
    <item>
      <title>Quote:Pavel Berdnikov (Intel)</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippStaticInit-called-multiple-times/m-p/895679#M12049</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Pavel Berdnikov (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hello Markzzz,&lt;/P&gt;&lt;P&gt;it depends on which version IPP&amp;nbsp;you use. Starting from IPP 2018 dispatch mechanism works automatically. In any case for double-safe I recommend you to call ippInit() before parallel region, just in start of the application.&lt;/P&gt;&lt;P&gt;Pavel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using&amp;nbsp;w_ipp_2019.1.144.&lt;/P&gt;&lt;P&gt;I got it works automatically, but is this automatic mechanism also thread-safe?&lt;/P&gt;&lt;P&gt;Out of curiosity... I don't see written in any manual ;)&lt;/P&gt;</description>
      <pubDate>Thu, 29 Nov 2018 14:00:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ippStaticInit-called-multiple-times/m-p/895679#M12049</guid>
      <dc:creator>markzzz</dc:creator>
      <dc:date>2018-11-29T14:00:25Z</dc:date>
    </item>
  </channel>
</rss>

