<?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 Convert non-ipp array to ipp array in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Convert-non-ipp-array-to-ipp-array/m-p/898084#M12384</link>
    <description>What is the best way to take an array of struct{ int r : 16; int i : 16; } and convert to an array of Ipp32f and then on to an array of Ipp32fc. &lt;BR /&gt;&lt;BR /&gt;Note: My access to the array of structs will be through a pointer, ie. I will not have access to the creation/allocation of the memory.&lt;BR /&gt;&lt;BR /&gt;Can I do the following?&lt;BR /&gt;&lt;BR /&gt;
&lt;CODE&gt;
//Define in some header file&lt;BR /&gt;typedef struct
{
&lt;BR /&gt;int r : 16;
&lt;BR /&gt;int i : 16;
&lt;BR /&gt;}ri;
&lt;BR /&gt;&lt;BR /&gt;//Defined in the c file with "void function(ri *src, len)"&lt;BR /&gt;Ipp32fc dest[32];&lt;BR /&gt;&lt;BR /&gt;void function(ri * src, len)&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;ippsConvert_16s32f((Ipp16s*)ri, (Ipp32f*)dest, len);&lt;BR /&gt;//.....&lt;BR /&gt;}
 &lt;/CODE&gt;
&lt;BR /&gt; &lt;BR /&gt;
Side question:  Does declaring an array such as dest above guarantee that it is 32 byte aligned as it would be if allocated with the ippsMalloc functions?&lt;BR /&gt;</description>
    <pubDate>Mon, 25 Aug 2008 19:47:52 GMT</pubDate>
    <dc:creator>Erik</dc:creator>
    <dc:date>2008-08-25T19:47:52Z</dc:date>
    <item>
      <title>Convert non-ipp array to ipp array</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Convert-non-ipp-array-to-ipp-array/m-p/898084#M12384</link>
      <description>What is the best way to take an array of struct{ int r : 16; int i : 16; } and convert to an array of Ipp32f and then on to an array of Ipp32fc. &lt;BR /&gt;&lt;BR /&gt;Note: My access to the array of structs will be through a pointer, ie. I will not have access to the creation/allocation of the memory.&lt;BR /&gt;&lt;BR /&gt;Can I do the following?&lt;BR /&gt;&lt;BR /&gt;
&lt;CODE&gt;
//Define in some header file&lt;BR /&gt;typedef struct
{
&lt;BR /&gt;int r : 16;
&lt;BR /&gt;int i : 16;
&lt;BR /&gt;}ri;
&lt;BR /&gt;&lt;BR /&gt;//Defined in the c file with "void function(ri *src, len)"&lt;BR /&gt;Ipp32fc dest[32];&lt;BR /&gt;&lt;BR /&gt;void function(ri * src, len)&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;ippsConvert_16s32f((Ipp16s*)ri, (Ipp32f*)dest, len);&lt;BR /&gt;//.....&lt;BR /&gt;}
 &lt;/CODE&gt;
&lt;BR /&gt; &lt;BR /&gt;
Side question:  Does declaring an array such as dest above guarantee that it is 32 byte aligned as it would be if allocated with the ippsMalloc functions?&lt;BR /&gt;</description>
      <pubDate>Mon, 25 Aug 2008 19:47:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Convert-non-ipp-array-to-ipp-array/m-p/898084#M12384</guid>
      <dc:creator>Erik</dc:creator>
      <dc:date>2008-08-25T19:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: Convert non-ipp array to ipp array</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Convert-non-ipp-array-to-ipp-array/m-p/898085#M12385</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;yes, using ippsConvert_16s32f function should be appropriate for this purpose. To align array allocated on the stack you may do something like this:&lt;BR /&gt;&lt;BR /&gt;Ipp8u buf[len * sizeof(Ipp32fc) + 31];&lt;BR /&gt;Ipp32f* dest = &amp;amp;buf[0] &amp;amp; (-32);&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt; Vladimir&lt;/P&gt;</description>
      <pubDate>Wed, 27 Aug 2008 17:12:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Convert-non-ipp-array-to-ipp-array/m-p/898085#M12385</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2008-08-27T17:12:53Z</dc:date>
    </item>
  </channel>
</rss>

