<?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 Removal of DMIP::Image copy constructor? in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Removal-of-DMIP-Image-copy-constructor/m-p/772384#M853</link>
    <description>Hi Marcus,&lt;BR /&gt;&lt;BR /&gt;Please take a look at a 2nd Test-Case and it does assignment from &lt;STRONG&gt;CImage&lt;/STRONG&gt; -&amp;gt; &lt;STRONG&gt;CDMIPImage&lt;/STRONG&gt;.Compare it&lt;BR /&gt;with the 1st Test-Case.&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt; ...&lt;BR /&gt; class &lt;STRONG&gt;CImage&lt;/STRONG&gt;&lt;BR /&gt; {&lt;BR /&gt; public:&lt;BR /&gt; &lt;STRONG&gt;CImage&lt;/STRONG&gt;( void )&lt;BR /&gt; {&lt;BR /&gt; m_piData = ( int * )new int[2];&lt;/P&gt;&lt;P&gt; m_piData[0] = 555;&lt;BR /&gt; m_piData[1] = 777;&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt; virtual &lt;STRONG&gt;~CImage&lt;/STRONG&gt;( void )&lt;BR /&gt; {&lt;BR /&gt; if( m_piData != NULL )&lt;BR /&gt; {&lt;BR /&gt; delete [] m_piData;&lt;BR /&gt; m_piData = NULL;&lt;BR /&gt; }&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt; int *m_piData;&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt; class &lt;STRONG&gt;CDMIPImage&lt;/STRONG&gt;&lt;BR /&gt; {&lt;BR /&gt; public:&lt;BR /&gt; &lt;STRONG&gt;CDMIPImage&lt;/STRONG&gt;( void )&lt;BR /&gt; {&lt;BR /&gt; m_piData = NULL;&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt; virtual &lt;STRONG&gt;~CDMIPImage&lt;/STRONG&gt;( void )&lt;BR /&gt; {&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;CDMIPImage&lt;/STRONG&gt; &amp;amp; operator = ( const &lt;STRONG&gt;CImage&lt;/STRONG&gt; &amp;amp;im )&lt;BR /&gt; {&lt;BR /&gt; m_piData = im.m_piData;&lt;/P&gt;&lt;P&gt; return ( &lt;STRONG&gt;CDMIPImage&lt;/STRONG&gt; &amp;amp; )*this;&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt; int *m_piData;&lt;BR /&gt; };&lt;BR /&gt; ...&lt;/P&gt;&lt;P&gt; void &lt;STRONG&gt;main&lt;/STRONG&gt;( void )&lt;BR /&gt; {&lt;BR /&gt; &lt;STRONG&gt;CImage&lt;/STRONG&gt; im;&lt;BR /&gt; &lt;STRONG&gt;CDMIPImage&lt;/STRONG&gt; dim;&lt;/P&gt;&lt;P&gt; dim = im;&lt;/P&gt;&lt;P&gt; printf( "%ld %ld\n", dim.m_piData[0], dim.m_piData[1] );&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt;I tested both Test-Cases and I think some finalsolution could be based on '&lt;STRONG&gt;operator=&lt;/STRONG&gt;(...)' approach.&lt;BR /&gt;Anyway, I would try-test several "prototypes" beforeselecting a best one.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Sergey&lt;/P&gt;</description>
    <pubDate>Wed, 21 Dec 2011 14:24:55 GMT</pubDate>
    <dc:creator>SergeyKostrov</dc:creator>
    <dc:date>2011-12-21T14:24:55Z</dc:date>
    <item>
      <title>Removal of DMIP::Image copy constructor?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Removal-of-DMIP-Image-copy-constructor/m-p/772380#M849</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;we started to use the DMIP extensions extensively with the introduction of DMIP 1.0. Recently (Ipp 7.0) the interface of the DMIP::Image class was changed and the copy constructor was moved to a protected scope&lt;BR /&gt;&lt;BR /&gt;// image.h&lt;BR /&gt;protected:&lt;BR /&gt; Image(Image&amp;amp;) {}&lt;BR /&gt;&lt;BR /&gt;Our image classes have been extended by a function to convert them to a DMIP::Image. Due to the above change all code was rendered useless and there seems to be no appropriate method to return a DMIP::Image from own functions as this always incorporates the use of the copy constructor.&lt;BR /&gt;&lt;BR /&gt;Alternatively we tried to use the copy-by-pointer function but this creates a deep copy of the image data as well.&lt;BR /&gt;&lt;BR /&gt;For sure there is a problem with dangling pointers but this problems also occurs using the standard constructor. Is there any other convenient way to convert own image classes which provide the needed data pointers etc. to a DMIP::Image using a member method? Calling the complete constructor of DMIP::Image every time is really annoying.&lt;BR /&gt;&lt;BR /&gt;What was the reason for this drastic change?&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;&lt;BR /&gt;Marcus</description>
      <pubDate>Tue, 20 Dec 2011 09:32:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Removal-of-DMIP-Image-copy-constructor/m-p/772380#M849</guid>
      <dc:creator>Rosenstiel__Marcus</dc:creator>
      <dc:date>2011-12-20T09:32:14Z</dc:date>
    </item>
    <item>
      <title>Removal of DMIP::Image copy constructor?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Removal-of-DMIP-Image-copy-constructor/m-p/772381#M850</link>
      <description>&lt;P&gt;&lt;STRONG&gt;&amp;gt;&amp;gt;...Is there any other convenient way to convert own image classes which provide the needed&lt;BR /&gt;&amp;gt;&amp;gt;data pointers etc. to a DMIP::Image using a member method?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;What about a C++ &lt;STRONG&gt;operator&lt;/STRONG&gt; '&lt;STRONG&gt;=&lt;/STRONG&gt;'? Take a look at a short example. Even if it does the &lt;SPAN style="text-decoration: underline;"&gt;opposite conversion&lt;/SPAN&gt;,&lt;BR /&gt;that is &lt;STRONG&gt;CDMIPImage&lt;/STRONG&gt; -&amp;gt; &lt;STRONG&gt;CImage&lt;/STRONG&gt;, you can use a similar technique:&lt;/P&gt;&lt;P&gt; ...&lt;BR /&gt; class &lt;STRONG&gt;CDMIPImage&lt;/STRONG&gt;&lt;BR /&gt; {&lt;BR /&gt; public:&lt;BR /&gt; &lt;STRONG&gt;CDMIPImage&lt;/STRONG&gt;( void )&lt;BR /&gt; {&lt;BR /&gt; m_piData = ( int * )new int[2];&lt;/P&gt;&lt;P&gt; m_piData[0] = 555;&lt;BR /&gt; m_piData[1] = 777;&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt; virtual ~&lt;STRONG&gt;CDMIPImage&lt;/STRONG&gt;( void )&lt;BR /&gt; {&lt;BR /&gt; if( m_piData !=NULL )&lt;BR /&gt; {&lt;BR /&gt; delete []m_piData;&lt;BR /&gt; m_piData = NULL;&lt;BR /&gt; }&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt; int *m_piData;&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt; class &lt;STRONG&gt;CImage&lt;/STRONG&gt;&lt;BR /&gt; {&lt;BR /&gt; public:&lt;BR /&gt; &lt;STRONG&gt;CImage&lt;/STRONG&gt;( void )&lt;BR /&gt; {&lt;BR /&gt; m_piData = NULL;&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt; virtual ~&lt;STRONG&gt;CImage&lt;/STRONG&gt;( void )&lt;BR /&gt; {&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;CImage&lt;/STRONG&gt; &amp;amp; operator &lt;STRONG&gt;=&lt;/STRONG&gt; ( const &lt;STRONG&gt;CDMIPImage&lt;/STRONG&gt; &amp;amp; dim )&lt;BR /&gt; {&lt;BR /&gt; m_piData = dim.m_piData;&lt;/P&gt;&lt;P&gt; return ( &lt;STRONG&gt;CImage&lt;/STRONG&gt; &amp;amp; )*this;&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt; int *m_piData;&lt;BR /&gt; };&lt;BR /&gt; ...&lt;/P&gt;&lt;P&gt; void &lt;STRONG&gt;main&lt;/STRONG&gt;( void )&lt;BR /&gt; {&lt;BR /&gt; &lt;STRONG&gt;CDMIPImage&lt;/STRONG&gt; dim;&lt;BR /&gt; &lt;STRONG&gt;CImage&lt;/STRONG&gt; im;&lt;/P&gt;&lt;P&gt; im = dim;&lt;/P&gt;&lt;P&gt; printf( "%ld %ld\n", im.m_piData[0], im.m_piData[1] );&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;Don't forget about correctmemory management because both objectswill share the same memory:&lt;BR /&gt;&lt;BR /&gt;int &lt;STRONG&gt;*m_piData&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Sergey&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2011 03:13:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Removal-of-DMIP-Image-copy-constructor/m-p/772381#M850</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2011-12-21T03:13:38Z</dc:date>
    </item>
    <item>
      <title>Removal of DMIP::Image copy constructor?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Removal-of-DMIP-Image-copy-constructor/m-p/772382#M851</link>
      <description>Hi Sergey,&lt;BR /&gt;&lt;BR /&gt;To assign CImage to DMIP::Image using operator=() we must implement the assignment within image.h that is changing intel sources which at the same time breaks the coherence of the 3rd party code. To get a short term solution we removed the copy constructor from the header to get the default copy constructor back which also breaks our 3rd party code coherence :-(.&lt;BR /&gt;&lt;BR /&gt;However it may be possible to derive from DMIP::Image, implement the copy constructor, use only the derived class and use the DMIP::Image assignment operator to assign the derived class to the base class. Nevertheless there will be still always multiple lines of code:&lt;BR /&gt;DMIP::MyImage mim = cImage.ToMyImage();&lt;BR /&gt;DMIP::Image im;&lt;BR /&gt;im = myderivedObject;&lt;BR /&gt;instead of&lt;BR /&gt;DMIP::Image im = cImage.ToMyImage(); &lt;BR /&gt;which is still not possible :-(.&lt;BR /&gt;&lt;BR /&gt;I still have no idea why the copy constructor was removed. The responsibility for correct memory management starts at the moment when a DMIP::Image is constructed using a data-pointer.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;&lt;BR /&gt;Marcus</description>
      <pubDate>Wed, 21 Dec 2011 11:15:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Removal-of-DMIP-Image-copy-constructor/m-p/772382#M851</guid>
      <dc:creator>Rosenstiel__Marcus</dc:creator>
      <dc:date>2011-12-21T11:15:11Z</dc:date>
    </item>
    <item>
      <title>Removal of DMIP::Image copy constructor?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Removal-of-DMIP-Image-copy-constructor/m-p/772383#M852</link>
      <description>Hi,&lt;BR /&gt;Before IPP 7.0 there was only default copy-constructor in DMIP::Image and it didn't work correctly. Thats why it using was prohibited. &lt;BR /&gt;&lt;BR /&gt;Igor</description>
      <pubDate>Wed, 21 Dec 2011 14:24:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Removal-of-DMIP-Image-copy-constructor/m-p/772383#M852</guid>
      <dc:creator>Igor_B_Intel1</dc:creator>
      <dc:date>2011-12-21T14:24:17Z</dc:date>
    </item>
    <item>
      <title>Removal of DMIP::Image copy constructor?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Removal-of-DMIP-Image-copy-constructor/m-p/772384#M853</link>
      <description>Hi Marcus,&lt;BR /&gt;&lt;BR /&gt;Please take a look at a 2nd Test-Case and it does assignment from &lt;STRONG&gt;CImage&lt;/STRONG&gt; -&amp;gt; &lt;STRONG&gt;CDMIPImage&lt;/STRONG&gt;.Compare it&lt;BR /&gt;with the 1st Test-Case.&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt; ...&lt;BR /&gt; class &lt;STRONG&gt;CImage&lt;/STRONG&gt;&lt;BR /&gt; {&lt;BR /&gt; public:&lt;BR /&gt; &lt;STRONG&gt;CImage&lt;/STRONG&gt;( void )&lt;BR /&gt; {&lt;BR /&gt; m_piData = ( int * )new int[2];&lt;/P&gt;&lt;P&gt; m_piData[0] = 555;&lt;BR /&gt; m_piData[1] = 777;&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt; virtual &lt;STRONG&gt;~CImage&lt;/STRONG&gt;( void )&lt;BR /&gt; {&lt;BR /&gt; if( m_piData != NULL )&lt;BR /&gt; {&lt;BR /&gt; delete [] m_piData;&lt;BR /&gt; m_piData = NULL;&lt;BR /&gt; }&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt; int *m_piData;&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt; class &lt;STRONG&gt;CDMIPImage&lt;/STRONG&gt;&lt;BR /&gt; {&lt;BR /&gt; public:&lt;BR /&gt; &lt;STRONG&gt;CDMIPImage&lt;/STRONG&gt;( void )&lt;BR /&gt; {&lt;BR /&gt; m_piData = NULL;&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt; virtual &lt;STRONG&gt;~CDMIPImage&lt;/STRONG&gt;( void )&lt;BR /&gt; {&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;CDMIPImage&lt;/STRONG&gt; &amp;amp; operator = ( const &lt;STRONG&gt;CImage&lt;/STRONG&gt; &amp;amp;im )&lt;BR /&gt; {&lt;BR /&gt; m_piData = im.m_piData;&lt;/P&gt;&lt;P&gt; return ( &lt;STRONG&gt;CDMIPImage&lt;/STRONG&gt; &amp;amp; )*this;&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt; int *m_piData;&lt;BR /&gt; };&lt;BR /&gt; ...&lt;/P&gt;&lt;P&gt; void &lt;STRONG&gt;main&lt;/STRONG&gt;( void )&lt;BR /&gt; {&lt;BR /&gt; &lt;STRONG&gt;CImage&lt;/STRONG&gt; im;&lt;BR /&gt; &lt;STRONG&gt;CDMIPImage&lt;/STRONG&gt; dim;&lt;/P&gt;&lt;P&gt; dim = im;&lt;/P&gt;&lt;P&gt; printf( "%ld %ld\n", dim.m_piData[0], dim.m_piData[1] );&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt;I tested both Test-Cases and I think some finalsolution could be based on '&lt;STRONG&gt;operator=&lt;/STRONG&gt;(...)' approach.&lt;BR /&gt;Anyway, I would try-test several "prototypes" beforeselecting a best one.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Sergey&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2011 14:24:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Removal-of-DMIP-Image-copy-constructor/m-p/772384#M853</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2011-12-21T14:24:55Z</dc:date>
    </item>
    <item>
      <title>Removal of DMIP::Image copy constructor?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Removal-of-DMIP-Image-copy-constructor/m-p/772385#M854</link>
      <description>&amp;gt;&amp;gt;...instead of&lt;BR /&gt;&amp;gt;&amp;gt;&lt;STRONG&gt;DMIP::Image im = cImage.ToMyImage();&lt;/STRONG&gt;&lt;BR /&gt;&amp;gt;&amp;gt;which is still not possible :-(.&lt;BR /&gt;&lt;BR /&gt;You could consider thesesolutions:&lt;BR /&gt;&lt;BR /&gt;//&lt;STRONG&gt;&lt;SPAN style="text-decoration: underline;"&gt;1&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;BR /&gt; ...&lt;BR /&gt; &lt;STRONG&gt;MyImage&lt;/STRONG&gt; im;&lt;BR /&gt; &lt;STRONG&gt;DMIPDerived&lt;/STRONG&gt; dim;&lt;BR /&gt; dim.&lt;STRONG&gt;ToMyImage&lt;/STRONG&gt;( &amp;amp;im );&lt;BR /&gt; ...&lt;BR /&gt;&lt;BR /&gt;// &lt;STRONG&gt;&lt;SPAN style="text-decoration: underline;"&gt;2&lt;/SPAN&gt;&lt;/STRONG&gt; - as a functionwith 2parameters&lt;BR /&gt; ...&lt;BR /&gt; &lt;STRONG&gt;MyImage&lt;/STRONG&gt; im;&lt;BR /&gt; &lt;STRONG&gt;DMIP&lt;/STRONG&gt; dim;&lt;BR /&gt; &lt;STRONG&gt;DMIPtoMyImage&lt;/STRONG&gt;( [in] &amp;amp;dim, [in-out] &amp;amp;im );&lt;BR /&gt; ...&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Sergey&lt;BR /&gt;</description>
      <pubDate>Thu, 22 Dec 2011 14:14:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Removal-of-DMIP-Image-copy-constructor/m-p/772385#M854</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2011-12-22T14:14:43Z</dc:date>
    </item>
    <item>
      <title>Removal of DMIP::Image copy constructor?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Removal-of-DMIP-Image-copy-constructor/m-p/772386#M855</link>
      <description>@Sergey&lt;BR /&gt;Thank you very much for your help. Unfortunately this still means we have to touch each line which calls the copy constructor at the moment :-(. &lt;BR /&gt;&lt;BR /&gt;@Igor&lt;BR /&gt;Could you explain what kind of error the old copy constructor will produce or even give an example? We already did a software rollout to our customers which includes the use of the copy constructor :-(.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;&lt;BR /&gt;Marcus</description>
      <pubDate>Thu, 22 Dec 2011 16:01:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Removal-of-DMIP-Image-copy-constructor/m-p/772386#M855</guid>
      <dc:creator>Rosenstiel__Marcus</dc:creator>
      <dc:date>2011-12-22T16:01:25Z</dc:date>
    </item>
    <item>
      <title>Removal of DMIP::Image copy constructor?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Removal-of-DMIP-Image-copy-constructor/m-p/772387#M856</link>
      <description>&amp;gt;&amp;gt;...Unfortunately this still means we have to touch each line which calls the copy constructor at the moment :-(&lt;BR /&gt;&lt;BR /&gt;If you would provide a small example ofhow it looks like in a real form it would be helpful. Code modifications are inevitable when some new functionality replacessome old functionality.&lt;BR /&gt;&lt;BR /&gt;Good Luck and keep everybody informed!&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Sergey&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;PS:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;Sorry for another proposal... :) Take a look at the Test-Case 2 and I think it could be changed to ( or something like this ):&lt;BR /&gt;&lt;BR /&gt; ...&lt;BR /&gt;&lt;STRONG&gt;CDMIPImage&lt;/STRONG&gt; &amp;amp; operator &amp;gt;&amp;gt;= ( const &lt;STRONG&gt;CImage&lt;/STRONG&gt; &amp;amp;im )&lt;BR /&gt; {&lt;BR /&gt;im.m_piData = m_piData;// &lt;SPAN style="text-decoration: underline;"&gt;I have not tested it andI'll do itsome time later...&lt;/SPAN&gt;&lt;P&gt; return ( &lt;STRONG&gt;CDMIPImage&lt;/STRONG&gt; &amp;amp; )*this;&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt; int *m_piData;&lt;BR /&gt; };&lt;BR /&gt; ...&lt;/P&gt;&lt;P&gt; void &lt;STRONG&gt;main&lt;/STRONG&gt;( void )&lt;BR /&gt; {&lt;BR /&gt; &lt;STRONG&gt;CImage&lt;/STRONG&gt; im;&lt;BR /&gt; &lt;STRONG&gt;CDMIPImage&lt;/STRONG&gt; dim;&lt;/P&gt;&lt;P&gt; dim &lt;STRONG&gt;&amp;gt;&amp;gt;=&lt;/STRONG&gt; im; // If you don't like '&lt;STRONG&gt;&amp;gt;&amp;gt;&lt;/STRONG&gt;' you can still use '&lt;STRONG&gt;=&lt;/STRONG&gt;'&lt;BR /&gt; ...&lt;BR /&gt; }&lt;BR /&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2011 01:26:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Removal-of-DMIP-Image-copy-constructor/m-p/772387#M856</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2011-12-23T01:26:28Z</dc:date>
    </item>
    <item>
      <title>Removal of DMIP::Image copy constructor?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Removal-of-DMIP-Image-copy-constructor/m-p/772388#M857</link>
      <description>Ok,&lt;BR /&gt;&lt;BR /&gt;here is my explanation why this change hurts me so explicitly:&lt;BR /&gt;Our image classes are not fully template based, that is the datatype and channels are burried in a base class ImageBase and all typed classes are inherited from that class i.e. ImageBase&amp;lt;-Image8u&amp;lt;-Image8uC1.&lt;BR /&gt;&lt;BR /&gt;I implemented the conversion using the NVI pattern. So there is a function DMIP::Image ToDMIPImage() in ImageBase which calls the non-public virtual function DMIP::Image ToDMIPImageImpl() which leads to the call of the overridden implementation in the derived classes e.g.&lt;BR /&gt;// Image8uC1&lt;BR /&gt;DMIP::Image ToDMIPImageImpl()&lt;BR /&gt;{&lt;BR /&gt; return ImageBase::ToDMIPImageGen&lt;VALUE_TYPE&gt;();&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;as each derived class has typedef'ed value_type and ipp_channels to avoid switch/case blocks. Then the non-public ImageBase::ToDMIPImageGen is called which is:&lt;BR /&gt;template &lt;CLASS t=""&gt;&lt;BR /&gt;DMIP::Image ToDMIPImageGen()&lt;BR /&gt;{&lt;BR /&gt; return DMIP::Image(DataPtr(), &lt;BR /&gt; static_cast&lt;IPPDATATYPE&gt;(type2ippdatatype&lt;T&gt;::value) , &lt;BR /&gt; static_cast&lt;IPPCHANNELS&gt;(C), &lt;BR /&gt; Size(), Step());&lt;BR /&gt;}&lt;BR /&gt;There are multiple calls of the copy-constructor during the "conversion". Finally it looks like this in the algorithms:&lt;BR /&gt;&lt;BR /&gt;Image8uC1 myImage&lt;BR /&gt;DMIP::Image myDmip = myImage.ToDMIPImage(); // calling the copy constructor&lt;BR /&gt;&lt;BR /&gt;I have already refactored the code returning a class which wraps a std::tr1::shared_ptr&lt;:IMAGE&gt; and overloads the operator*() so that the copy-by-pointer constructor is called while non of the lines like the two above have to be changed...unfortunately the copy-by-pointer constructor leads to a deep copy of the image. I'm willing to change the backend of our image library if the above two lines are still working and I don't have to change them to something like&lt;BR /&gt;&lt;BR /&gt;Image8uC1 myImage;&lt;BR /&gt;
DMIP::Image myDmip; // calling the default constructor&lt;BR /&gt;myDmip = myImage.ToDMIPImage(); // calling the assignment operator&lt;BR /&gt;&lt;BR /&gt;which is obviously possible as we have discussed in the above postings.&lt;BR /&gt;&lt;BR /&gt;At the moment I'm a little bit worried that our released code may be unstable if the default copy constructor is not working correctly.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;&lt;BR /&gt;Marcus&lt;BR /&gt;&lt;/:IMAGE&gt;&lt;/IPPCHANNELS&gt;&lt;/T&gt;&lt;/IPPDATATYPE&gt;&lt;/CLASS&gt;&lt;/VALUE_TYPE&gt;</description>
      <pubDate>Fri, 23 Dec 2011 08:57:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Removal-of-DMIP-Image-copy-constructor/m-p/772388#M857</guid>
      <dc:creator>Rosenstiel__Marcus</dc:creator>
      <dc:date>2011-12-23T08:57:32Z</dc:date>
    </item>
    <item>
      <title>Removal of DMIP::Image copy constructor?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Removal-of-DMIP-Image-copy-constructor/m-p/772389#M858</link>
      <description>Thanks, Marcus!&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt;&amp;gt;&amp;gt;...Unfortunately the copy-by-pointer constructor leads to a deep copy of the image...&lt;/P&gt;&lt;P&gt; Possibly affecting performance and this is not a good thing.&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;..I'm a little bit worried that our released code may be unstable if the default copy constructor is not working correctly.&lt;/P&gt;&lt;P&gt; In that case I wouldn't delay testing of Release configuration of applications.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Sergey&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2011 13:50:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Removal-of-DMIP-Image-copy-constructor/m-p/772389#M858</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2011-12-23T13:50:00Z</dc:date>
    </item>
    <item>
      <title>Removal of DMIP::Image copy constructor?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Removal-of-DMIP-Image-copy-constructor/m-p/772390#M859</link>
      <description>&lt;DIV id="tiny_quote"&gt;&lt;DIV style="margin-left: 2px; margin-right: 2px;"&gt;Quoting &lt;A jquery1324651964031="53" rel="/en-us/services/profile/quick_profile.php?is_paid=&amp;amp;user_id=353541" href="https://community.intel.com/en-us/profile/353541/" class="basic"&gt;Sergey Kostrov&lt;/A&gt;&lt;/DIV&gt;&lt;DIV style="background-color: #e5e5e5; margin-left: 2px; margin-right: 2px; border: 1px inset; padding: 5px;"&gt;&lt;I&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;PS:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;Sorry for another proposal... :) Take a look at the Test-Case 2 and I think it could be changed to ( or something like this ):&lt;BR /&gt;&lt;BR /&gt; ...&lt;BR /&gt;&lt;STRONG&gt;CDMIPImage&lt;/STRONG&gt; &amp;amp; operator &amp;gt;&amp;gt;= ( &lt;SPAN style="text-decoration: line-through;"&gt;const&lt;/SPAN&gt; &lt;STRONG&gt;CImage&lt;/STRONG&gt; &amp;amp;im )&lt;BR /&gt; {&lt;BR /&gt;im.m_piData = m_piData;// &lt;SPAN style="text-decoration: underline;"&gt;I have not tested it andI'll do itsome time later...&lt;/SPAN&gt; &lt;P&gt; return ( &lt;STRONG&gt;CDMIPImage&lt;/STRONG&gt; &amp;amp; )*this;&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt; int *m_piData;&lt;BR /&gt; };&lt;BR /&gt; ...&lt;/P&gt;&lt;/I&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;Just tested: '&lt;STRONG&gt;&lt;SPAN style="text-decoration: underline;"&gt;const&lt;/SPAN&gt;&lt;/STRONG&gt;' specificator has to be removed. It works.&lt;BR /&gt;&lt;BR /&gt;Anyway, I really like your template-based solution because it easily takes into account different types of images!&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Sergey&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2011 14:56:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Removal-of-DMIP-Image-copy-constructor/m-p/772390#M859</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2011-12-23T14:56:50Z</dc:date>
    </item>
  </channel>
</rss>

