<?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 Hi Nikolas, in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problems-building-custom-so/m-p/1010962#M23331</link>
    <description>&lt;P&gt;Hi Nikolas,&lt;/P&gt;

&lt;P&gt;as I understand you would like to build custom shared library on Linux, so I provide instructions and examples for Linux:&lt;/P&gt;

&lt;P&gt;1) define export.txt (you can use any filename) file with exact list of IPP functions which will be exported in your library, for example:&lt;/P&gt;

&lt;P&gt;EXTERN( ippiGetLibVersion )&lt;BR /&gt;
	EXTERN( ippsGetLibVersion )&lt;BR /&gt;
	EXTERN( ippiMalloc_16s_C1 )&lt;BR /&gt;
	EXTERN( ippiFree )&lt;BR /&gt;
	EXTERN( ippiSet_16s_C1R )&lt;BR /&gt;
	EXTERN( ippiMul_16s_C1RSfs )&lt;/P&gt;

&lt;P&gt;VERSION {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;{&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; global:&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; ippiGetLibVersion;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; ippsGetLibVersion;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; ippiMalloc_16s_C1;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; ippiFree;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; ippiSet_16s_C1R;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; ippiMul_16s_C1RSfs;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; local: *;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;};&lt;BR /&gt;
	}&lt;/P&gt;

&lt;P&gt;2) define _init() function where you should call ippInit() to initialize IPP dispatcher (main.c):&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;#include "ipp.h"

int _init(void)
{
   ippInit();
   return 1;
}

void _fini(void)
{
}
&lt;/PRE&gt;

&lt;P&gt;3) compile main.c with -fPIC option and build your shared library:&lt;/P&gt;

&lt;P&gt;ld -shared export.txt -o libmylib.so main.o&lt;SPAN style="line-height: 19.5120010375977px;"&gt;&amp;nbsp;$(IPPROOT)/lib/intel64/libippi.a&amp;nbsp;$(IPPROOT)/lib/intel64/libipps.a&amp;nbsp;$(IPPROOT)/lib/intel64/libippcore.a&lt;/SPAN&gt; -lc&lt;/P&gt;

&lt;P&gt;That all.&lt;/P&gt;

&lt;P&gt;Pavel&lt;/P&gt;</description>
    <pubDate>Fri, 03 Oct 2014 05:59:28 GMT</pubDate>
    <dc:creator>Pavel_B_Intel1</dc:creator>
    <dc:date>2014-10-03T05:59:28Z</dc:date>
    <item>
      <title>Problems building custom so</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problems-building-custom-so/m-p/1010961#M23330</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am trying to build a custom .so to link my C++ software against but I am having trouble.&lt;/P&gt;

&lt;P&gt;Are there clear and detailed instructions to build a custom .so using CMake that I could find somewhere? If not, can someone guide me through the process. I have instructions for a custom dll from IPP version 6 and sample code from the IPP website but I can't make it work.&lt;/P&gt;

&lt;P&gt;From what I understand, I need&amp;nbsp;4 files:&lt;/P&gt;

&lt;OL&gt;
	&lt;LI&gt;exports.def (or .txt)&amp;nbsp;containing the list of fucntions I need.&lt;/LI&gt;
	&lt;LI&gt;funclist.h containing the declarations of the functions from the ipp*.h files.&lt;/LI&gt;
	&lt;LI&gt;some sort of .c file (dllmain.c or init.c) to bring everything together. This is where I get lost...&lt;/LI&gt;
	&lt;LI&gt;CMakeLists.txt to compile everything.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Are these the only files I need? What are they supposed to contain?&lt;/P&gt;

&lt;P&gt;Thank you very much for your help!&lt;/P&gt;

&lt;P&gt;Nicolas&lt;/P&gt;</description>
      <pubDate>Thu, 02 Oct 2014 13:01:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Problems-building-custom-so/m-p/1010961#M23330</guid>
      <dc:creator>Nicolas_G_</dc:creator>
      <dc:date>2014-10-02T13:01:50Z</dc:date>
    </item>
    <item>
      <title>Hi Nikolas,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problems-building-custom-so/m-p/1010962#M23331</link>
      <description>&lt;P&gt;Hi Nikolas,&lt;/P&gt;

&lt;P&gt;as I understand you would like to build custom shared library on Linux, so I provide instructions and examples for Linux:&lt;/P&gt;

&lt;P&gt;1) define export.txt (you can use any filename) file with exact list of IPP functions which will be exported in your library, for example:&lt;/P&gt;

&lt;P&gt;EXTERN( ippiGetLibVersion )&lt;BR /&gt;
	EXTERN( ippsGetLibVersion )&lt;BR /&gt;
	EXTERN( ippiMalloc_16s_C1 )&lt;BR /&gt;
	EXTERN( ippiFree )&lt;BR /&gt;
	EXTERN( ippiSet_16s_C1R )&lt;BR /&gt;
	EXTERN( ippiMul_16s_C1RSfs )&lt;/P&gt;

&lt;P&gt;VERSION {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;{&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; global:&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; ippiGetLibVersion;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; ippsGetLibVersion;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; ippiMalloc_16s_C1;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; ippiFree;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; ippiSet_16s_C1R;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; ippiMul_16s_C1RSfs;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; local: *;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;};&lt;BR /&gt;
	}&lt;/P&gt;

&lt;P&gt;2) define _init() function where you should call ippInit() to initialize IPP dispatcher (main.c):&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;#include "ipp.h"

int _init(void)
{
   ippInit();
   return 1;
}

void _fini(void)
{
}
&lt;/PRE&gt;

&lt;P&gt;3) compile main.c with -fPIC option and build your shared library:&lt;/P&gt;

&lt;P&gt;ld -shared export.txt -o libmylib.so main.o&lt;SPAN style="line-height: 19.5120010375977px;"&gt;&amp;nbsp;$(IPPROOT)/lib/intel64/libippi.a&amp;nbsp;$(IPPROOT)/lib/intel64/libipps.a&amp;nbsp;$(IPPROOT)/lib/intel64/libippcore.a&lt;/SPAN&gt; -lc&lt;/P&gt;

&lt;P&gt;That all.&lt;/P&gt;

&lt;P&gt;Pavel&lt;/P&gt;</description>
      <pubDate>Fri, 03 Oct 2014 05:59:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Problems-building-custom-so/m-p/1010962#M23331</guid>
      <dc:creator>Pavel_B_Intel1</dc:creator>
      <dc:date>2014-10-03T05:59:28Z</dc:date>
    </item>
  </channel>
</rss>

