Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

CDR_Base.cpp

Go to the documentation of this file.
00001 #include "ace_pch.h"
00002 // -*- C++ -*-
00003 //
00004 // $Id: CDR_Base.cpp,v 1.1.1.2.2.1 2003/03/13 19:44:20 chad Exp $
00005 
00006 #include "ace/CDR_Base.h"
00007 #include "ace/Message_Block.h"
00008 
00009 #if !defined (__ACE_INLINE__)
00010 # include "ace/CDR_Base.inl"
00011 #endif /* ! __ACE_INLINE__ */
00012 
00013 ACE_RCSID(ace, CDR_Base, "$Id: CDR_Base.cpp,v 1.1.1.2.2.1 2003/03/13 19:44:20 chad Exp $")
00014 
00015 
00016 //
00017 // See comments in CDR_Base.i about optimization cases for swap_XX_array.
00018 //
00019 
00020 void
00021 ACE_CDR::swap_2_array (const char* orig, char* target, size_t n)
00022 {
00023   // ACE_ASSERT(n > 0); The caller checks that n > 0
00024 
00025   // Later, we try to read in 32 or 64 bit chunks,
00026   // so make sure we don't do that for unaligned addresses.
00027 #if ACE_SIZEOF_LONG == 8
00028   const char* const o8 = ACE_ptr_align_binary(orig, 8);
00029   while (orig < o8 && n > 0)
00030     {
00031       ACE_CDR::swap_2 (orig, target);
00032       orig += 2;
00033       target += 2;
00034       --n;
00035     }
00036 #else
00037   const char* const o4 = ACE_ptr_align_binary(orig, 4);
00038   // this is an _if_, not a _while_. The mistmatch can only be by 2.
00039   if (orig != o4)
00040     {
00041       ACE_CDR::swap_2 (orig, target);
00042       orig += 2;
00043       target += 2;
00044       --n;
00045     }
00046 #endif
00047   if (n == 0)
00048     return;
00049 
00050   //
00051   // Loop unrolling. Here be dragons.
00052   //
00053 
00054   // (n & (~3)) is the greatest multiple of 4 not bigger than n.
00055   // In the while loop ahead, orig will move over the array by 8 byte
00056   // increments (4 elements of 2 bytes).
00057   // end marks our barrier for not falling outside.
00058   const char* const end = orig + 2*(n & (~3));
00059 
00060   // See if we're aligned for writting in 64 or 32 bit chunks...
00061 #if ACE_SIZEOF_LONG == 8
00062   if (target == ACE_ptr_align_binary(target, 8))
00063 #else
00064   if (target == ACE_ptr_align_binary(target, 4))
00065 #endif
00066     {
00067       while (orig < end)
00068         {
00069 #if defined(ACE_HAS_PENTIUM) && defined(__GNUG__)
00070           unsigned int a =
00071             * ACE_reinterpret_cast(const unsigned int*, orig);
00072           unsigned int b =
00073             * ACE_reinterpret_cast(const unsigned int*, orig + 4);
00074           asm( "bswap %1"      : "=r" (a) : "0" (a) );
00075           asm( "bswap %1"      : "=r" (b) : "0" (b) );
00076           asm( "rol $16, %1"   : "=r" (a) : "0" (a) );
00077           asm( "rol $16, %1"   : "=r" (b) : "0" (b) );
00078           * ACE_reinterpret_cast(unsigned int*, target) = a;
00079           * ACE_reinterpret_cast(unsigned int*, target + 4) = b;
00080 #elif defined(ACE_HAS_PENTIUM) \
00081       && (defined(_MSC_VER) || defined(__BORLANDC__)) \
00082       && !defined(ACE_LACKS_INLINE_ASSEMBLY)
00083           __asm mov ecx, orig;
00084           __asm mov edx, target;
00085           __asm mov eax, [ecx];
00086           __asm mov ebx, 4[ecx];
00087           __asm bswap eax;
00088           __asm bswap ebx;
00089           __asm rol eax, 16;
00090           __asm rol ebx, 16;
00091           __asm mov [edx], eax;
00092           __asm mov 4[edx], ebx;
00093 #elif ACE_SIZEOF_LONG == 8
00094           // 64 bit architecture.
00095           register unsigned long a =
00096             * ACE_reinterpret_cast(const unsigned long*, orig);
00097 
00098           register unsigned long a1 = (a & 0x00ff00ff00ff00ffUL) << 8;
00099           register unsigned long a2 = (a & 0xff00ff00ff00ff00UL) >> 8;
00100 
00101           a = (a1 | a2);
00102 
00103           * ACE_reinterpret_cast(unsigned long*, target) = a;
00104 #else
00105           register ACE_UINT32 a =
00106             * ACE_reinterpret_cast(const ACE_UINT32*, orig);
00107           register ACE_UINT32 b =
00108             * ACE_reinterpret_cast(const ACE_UINT32*, orig + 4);
00109 
00110           register ACE_UINT32 a1 = (a & 0x00ff00ffU) << 8;
00111           register ACE_UINT32 b1 = (b & 0x00ff00ffU) << 8;
00112           register ACE_UINT32 a2 = (a & 0xff00ff00U) >> 8;
00113           register ACE_UINT32 b2 = (b & 0xff00ff00U) >> 8;
00114 
00115           a = (a1 | a2);
00116           b = (b1 | b2);
00117 
00118           * ACE_reinterpret_cast(ACE_UINT32*, target) = a;
00119           * ACE_reinterpret_cast(ACE_UINT32*, target + 4) = b;
00120 #endif
00121           orig += 8;
00122           target += 8;
00123         }
00124     }
00125   else
00126     {
00127       // We're out of luck. We have to write in 2 byte chunks.
00128       while (orig < end)
00129         {
00130 #if defined(ACE_HAS_PENTIUM) && defined(__GNUG__)
00131           unsigned int a =
00132             * ACE_reinterpret_cast(const unsigned int*, orig);
00133           unsigned int b =
00134             * ACE_reinterpret_cast(const unsigned int*, orig + 4);
00135           asm( "bswap %1" : "=r" (a) : "0" (a) );
00136           asm( "bswap %1" : "=r" (b) : "0" (b) );
00137           // We're little endian.
00138           * ACE_reinterpret_cast(unsigned short*, target + 2)
00139               = (unsigned short) (a & 0xffff);
00140           * ACE_reinterpret_cast(unsigned short*, target + 6)
00141               = (unsigned short) (b & 0xffff);
00142           asm( "shrl $16, %1" : "=r" (a) : "0" (a) );
00143           asm( "shrl $16, %1" : "=r" (b) : "0" (b) );
00144           * ACE_reinterpret_cast(unsigned short*, target + 0)
00145               = (unsigned short) (a & 0xffff);
00146           * ACE_reinterpret_cast(unsigned short*, target + 4)
00147               = (unsigned short) (b & 0xffff);
00148 #elif defined(ACE_HAS_PENTIUM) \
00149       && (defined(_MSC_VER) || defined(__BORLANDC__)) \
00150       && !defined(ACE_LACKS_INLINE_ASSEMBLY)
00151           __asm mov ecx, orig;
00152           __asm mov edx, target;
00153           __asm mov eax, [ecx];
00154           __asm mov ebx, 4[ecx];
00155           __asm bswap eax;
00156           __asm bswap ebx;
00157           // We're little endian.
00158           __asm mov 2[edx], ax;
00159           __asm mov 6[edx], bx;
00160           __asm shr eax, 16;
00161           __asm shr ebx, 16;
00162           __asm mov 0[edx], ax;
00163           __asm mov 4[edx], bx;
00164 #elif ACE_SIZEOF_LONG == 8
00165           // 64 bit architecture.
00166           register unsigned long a =
00167             * ACE_reinterpret_cast(const unsigned long*, orig);
00168 
00169           register unsigned long a1 = (a & 0x00ff00ff00ff00ffUL) << 8;
00170           register unsigned long a2 = (a & 0xff00ff00ff00ff00UL) >> 8;
00171 
00172           a = (a1 | a2);
00173 
00174           ACE_UINT16 b1 = ACE_static_cast(ACE_UINT16, (a >> 48));
00175           ACE_UINT16 b2 = ACE_static_cast(ACE_UINT16, ((a >> 32) & 0xffff));
00176           ACE_UINT16 b3 = ACE_static_cast(ACE_UINT16, ((a >> 16) & 0xffff));
00177           ACE_UINT16 b4 = ACE_static_cast(ACE_UINT16, (a & 0xffff));
00178 
00179 #if defined(ACE_LITTLE_ENDIAN)
00180           * ACE_reinterpret_cast(ACE_UINT16*, target) = b4;
00181           * ACE_reinterpret_cast(ACE_UINT16*, target + 2) = b3;
00182           * ACE_reinterpret_cast(ACE_UINT16*, target + 4) = b2;
00183           * ACE_reinterpret_cast(ACE_UINT16*, target + 6) = b1;
00184 #else
00185           * ACE_reinterpret_cast(ACE_UINT16*, target) = b1;
00186           * ACE_reinterpret_cast(ACE_UINT16*, target + 2) = b2;
00187           * ACE_reinterpret_cast(ACE_UINT16*, target + 4) = b3;
00188           * ACE_reinterpret_cast(ACE_UINT16*, target + 6) = b4;
00189 #endif
00190 #else
00191           register ACE_UINT32 a =
00192             * ACE_reinterpret_cast(const ACE_UINT32*, orig);
00193           register ACE_UINT32 b =
00194             * ACE_reinterpret_cast(const ACE_UINT32*, orig + 4);
00195 
00196           register ACE_UINT32 a1 = (a & 0x00ff00ff) << 8;
00197           register ACE_UINT32 b1 = (b & 0x00ff00ff) << 8;
00198           register ACE_UINT32 a2 = (a & 0xff00ff00) >> 8;
00199           register ACE_UINT32 b2 = (b & 0xff00ff00) >> 8;
00200 
00201           a = (a1 | a2);
00202           b = (b1 | b2);
00203 
00204           ACE_UINT32 c1 = ACE_static_cast(ACE_UINT16, (a >> 16));
00205           ACE_UINT32 c2 = ACE_static_cast(ACE_UINT16, (a & 0xffff));
00206           ACE_UINT32 c3 = ACE_static_cast(ACE_UINT16, (b >> 16));
00207           ACE_UINT32 c4 = ACE_static_cast(ACE_UINT16, (b & 0xffff));
00208 
00209 #if defined(ACE_LITTLE_ENDIAN)
00210           * ACE_reinterpret_cast(ACE_UINT16*, target) = c2;
00211           * ACE_reinterpret_cast(ACE_UINT16*, target + 2) = c1;
00212           * ACE_reinterpret_cast(ACE_UINT16*, target + 4) = c4;
00213           * ACE_reinterpret_cast(ACE_UINT16*, target + 6) = c3;
00214 #else
00215           * ACE_reinterpret_cast(ACE_UINT16*, target) = c1;
00216           * ACE_reinterpret_cast(ACE_UINT16*, target + 2) = c2;
00217           * ACE_reinterpret_cast(ACE_UINT16*, target + 4) = c3;
00218           * ACE_reinterpret_cast(ACE_UINT16*, target + 6) = c4;
00219 #endif
00220 #endif
00221 
00222           orig += 8;
00223           target += 8;
00224         }
00225     }
00226 
00227   // (n & 3) == (n % 4).
00228   switch (n&3) {
00229   case 3:
00230     ACE_CDR::swap_2 (orig, target);
00231     orig += 2;
00232     target += 2;
00233   case 2:
00234     ACE_CDR::swap_2 (orig, target);
00235     orig += 2;
00236     target += 2;
00237   case 1:
00238     ACE_CDR::swap_2 (orig, target);
00239   }
00240 }
00241 
00242 void
00243 ACE_CDR::swap_4_array (const char* orig, char* target, size_t n)
00244 {
00245   // ACE_ASSERT(n > 0); The caller checks that n > 0
00246 
00247 #if ACE_LONG_SIZE == 8
00248   // Later, we read from *orig in 64 bit chunks,
00249   // so make sure we don't generate unaligned readings.
00250   const char* const o8 = ACE_ptr_align_binary(orig, 8);
00251   // The mistmatch can only be by 4.
00252   if (orig != o8)
00253     {
00254       ACE_CDR::swap_4 (orig, target);
00255       orig += 4;
00256       target += 4;
00257       --n;
00258     }
00259 #endif
00260   if (n == 0)
00261     return;
00262 
00263   //
00264   // Loop unrolling. Here be dragons.
00265   //
00266 
00267   // (n & (~3)) is the greatest multiple of 4 not bigger than n.
00268   // In the while loop, orig will move over the array by 16 byte
00269   // increments (4 elements of 4 bytes).
00270   // ends marks our barrier for not falling outside.
00271   const char* const end = orig + 4*(n & (~3));
00272 
00273 #if ACE_LONG_SIZE == 8
00274   // 64 bits architecture.
00275   // See if we can write in 8 byte chunks.
00276   if (target == ACE_ptr_align_binary(target, 8))
00277     {
00278       while (orig < end)
00279         {
00280           register unsigned long a =
00281             * ACE_reinterpret_cast(const long*, orig);
00282           register unsigned long b =
00283             * ACE_reinterpret_cast(const long*, orig + 8);
00284 
00285           register unsigned long a84 = (a & 0x000000ff000000ffL) << 24;
00286           register unsigned long b84 = (b & 0x000000ff000000ffL) << 24;
00287           register unsigned long a73 = (a & 0x0000ff000000ff00L) << 8;
00288           register unsigned long b73 = (b & 0x0000ff000000ff00L) << 8;
00289           register unsigned long a62 = (a & 0x00ff000000ff0000L) >> 8;
00290           register unsigned long b62 = (b & 0x00ff000000ff0000L) >> 8;
00291           register unsigned long a51 = (a & 0xff000000ff000000L) >> 24;
00292           register unsigned long b51 = (b & 0xff000000ff000000L) >> 24;
00293 
00294           a = (a84 | a73 | a62 | a51);
00295           b = (b84 | b73 | b62 | b51);
00296 
00297           * ACE_reinterpret_cast(long*, target) = a;
00298           * ACE_reinterpret_cast(long*, target + 8) = b;
00299 
00300           orig += 16;
00301           target += 16;
00302         }
00303     }
00304   else
00305     {
00306       // We are out of luck, we have to write in 4 byte chunks.
00307       while (orig < end)
00308         {
00309           register unsigned long a =
00310             * ACE_reinterpret_cast(const long*, orig);
00311           register unsigned long b =
00312             * ACE_reinterpret_cast(const long*, orig + 8);
00313 
00314           register unsigned long a84 = (a & 0x000000ff000000ffL) << 24;
00315           register unsigned long b84 = (b & 0x000000ff000000ffL) << 24;
00316           register unsigned long a73 = (a & 0x0000ff000000ff00L) << 8;
00317           register unsigned long b73 = (b & 0x0000ff000000ff00L) << 8;
00318           register unsigned long a62 = (a & 0x00ff000000ff0000L) >> 8;
00319           register unsigned long b62 = (b & 0x00ff000000ff0000L) >> 8;
00320           register unsigned long a51 = (a & 0xff000000ff000000L) >> 24;
00321           register unsigned long b51 = (b & 0xff000000ff000000L) >> 24;
00322 
00323           a = (a84 | a73 | a62 | a51);
00324           b = (b84 | b73 | b62 | b51);
00325 
00326           ACE_UINT32 c1 = ACE_static_cast(ACE_UINT32, (a >> 32));
00327           ACE_UINT32 c2 = ACE_static_cast(ACE_UINT32, (a & 0xffffffff));
00328           ACE_UINT32 c3 = ACE_static_cast(ACE_UINT32, (b >> 32));
00329           ACE_UINT32 c4 = ACE_static_cast(ACE_UINT32, (b & 0xffffffff));
00330 
00331 #if defined(ACE_LITTLE_ENDIAN)
00332           * ACE_reinterpret_cast(ACE_UINT32*, target + 0) = c2;
00333           * ACE_reinterpret_cast(ACE_UINT32*, target + 4) = c1;
00334           * ACE_reinterpret_cast(ACE_UINT32*, target + 8) = c4;
00335           * ACE_reinterpret_cast(ACE_UINT32*, target + 12) = c3;
00336 #else
00337           * ACE_reinterpret_cast(ACE_UINT32*, target + 0) = c1;
00338           * ACE_reinterpret_cast(ACE_UINT32*, target + 4) = c2;
00339           * ACE_reinterpret_cast(ACE_UINT32*, target + 8) = c3;
00340           * ACE_reinterpret_cast(ACE_UINT32*, target + 12) = c4;
00341 #endif
00342           orig += 16;
00343           target += 16;
00344         }
00345     }
00346 
00347 #else /* ACE_LONG_SIZE != 8 */
00348 
00349   while (orig < end)
00350     {
00351 #if defined(ACE_HAS_PENTIUM) && defined(__GNUG__)
00352       register unsigned int a =
00353         *ACE_reinterpret_cast(const unsigned int*, orig);
00354       register unsigned int b =
00355         *ACE_reinterpret_cast(const unsigned int*, orig + 4);
00356       register unsigned int c =
00357         *ACE_reinterpret_cast(const unsigned int*, orig + 8);
00358       register unsigned int d =
00359         *ACE_reinterpret_cast(const unsigned int*, orig + 12);
00360 
00361       asm ("bswap %1" : "=r" (a) : "0" (a));
00362       asm ("bswap %1" : "=r" (b) : "0" (b));
00363       asm ("bswap %1" : "=r" (c) : "0" (c));
00364       asm ("bswap %1" : "=r" (d) : "0" (d));
00365 
00366       *ACE_reinterpret_cast(unsigned int*, target) = a;
00367       *ACE_reinterpret_cast(unsigned int*, target + 4) = b;
00368       *ACE_reinterpret_cast(unsigned int*, target + 8) = c;
00369       *ACE_reinterpret_cast(unsigned int*, target + 12) = d;
00370 #elif defined(ACE_HAS_PENTIUM) \
00371       && (defined(_MSC_VER) || defined(__BORLANDC__)) \
00372       && !defined(ACE_LACKS_INLINE_ASSEMBLY)
00373       __asm mov eax, orig
00374       __asm mov esi, target
00375       __asm mov edx, [eax]
00376       __asm mov ecx, 4[eax]
00377       __asm mov ebx, 8[eax]
00378       __asm mov eax, 12[eax]
00379       __asm bswap edx
00380       __asm bswap ecx
00381       __asm bswap ebx
00382       __asm bswap eax
00383       __asm mov [esi], edx
00384       __asm mov 4[esi], ecx
00385       __asm mov 8[esi], ebx
00386       __asm mov 12[esi], eax
00387 #else
00388       register ACE_UINT32 a =
00389         * ACE_reinterpret_cast(const ACE_UINT32*, orig);
00390       register ACE_UINT32 b =
00391         * ACE_reinterpret_cast(const ACE_UINT32*, orig + 4);
00392       register ACE_UINT32 c =
00393         * ACE_reinterpret_cast(const ACE_UINT32*, orig + 8);
00394       register ACE_UINT32 d =
00395         * ACE_reinterpret_cast(const ACE_UINT32*, orig + 12);
00396 
00397       // Expect the optimizer reordering this A LOT.
00398       // We leave it this way for clarity.
00399       a = (a << 24) | ((a & 0xff00) << 8) | ((a & 0xff0000) >> 8) | (a >> 24);
00400       b = (b << 24) | ((b & 0xff00) << 8) | ((b & 0xff0000) >> 8) | (b >> 24);
00401       c = (c << 24) | ((c & 0xff00) << 8) | ((c & 0xff0000) >> 8) | (c >> 24);
00402       d = (d << 24) | ((d & 0xff00) << 8) | ((d & 0xff0000) >> 8) | (d >> 24);
00403 
00404       * ACE_reinterpret_cast(ACE_UINT32*, target) = a;
00405       * ACE_reinterpret_cast(ACE_UINT32*, target + 4) = b;
00406       * ACE_reinterpret_cast(ACE_UINT32*, target + 8) = c;
00407       * ACE_reinterpret_cast(ACE_UINT32*, target + 12) = d;
00408 #endif
00409 
00410       orig += 16;
00411       target += 16;
00412     }
00413 
00414 #endif /* ACE_LONG_SIZE == 8 */
00415 
00416   // (n & 3) == (n % 4).
00417   switch (n&3) {
00418   case 3:
00419     ACE_CDR::swap_4 (orig, target);
00420     orig += 4;
00421     target += 4;
00422   case 2:
00423     ACE_CDR::swap_4 (orig, target);
00424     orig += 4;
00425     target += 4;
00426   case 1:
00427     ACE_CDR::swap_4 (orig, target);
00428   }
00429 }
00430 
00431 //
00432 // We don't benefit from unrolling in swap_8_array and swap_16_array
00433 // (swap_8 and swap_16 are big enough).
00434 //
00435 void
00436 ACE_CDR::swap_8_array (const char* orig, char* target, size_t n)
00437 {
00438   // ACE_ASSERT(n > 0); The caller checks that n > 0
00439 
00440   const char* const end = orig + 8*n;
00441   while (orig < end)
00442     {
00443       swap_8(orig, target);
00444       orig += 8;
00445       target += 8;
00446     }
00447 }
00448 
00449 void
00450 ACE_CDR::swap_16_array (const char* orig, char* target, size_t n)
00451 {
00452   // ACE_ASSERT(n > 0); The caller checks that n > 0
00453 
00454   const char* const end = orig + 16*n;
00455   while (orig < end)
00456     {
00457       swap_16(orig, target);
00458       orig += 16;
00459       target += 16;
00460     }
00461 }
00462 
00463 int
00464 ACE_CDR::grow (ACE_Message_Block *mb, size_t minsize)
00465 {
00466   size_t newsize =
00467     ACE_CDR::first_size (minsize + ACE_CDR::MAX_ALIGNMENT);
00468 
00469   if (newsize <= mb->size ())
00470     return 0;
00471 
00472   ACE_Data_Block *db =
00473     mb->data_block ()->clone_nocopy ();
00474 
00475   if (db->size (newsize) == -1)
00476     return -1;
00477 
00478   ACE_Message_Block tmp (db);
00479   ACE_CDR::mb_align (&tmp);
00480 
00481   tmp.copy (mb->rd_ptr (), mb->length());
00482   mb->data_block (tmp.data_block ()->duplicate ());
00483   mb->rd_ptr (tmp.rd_ptr ());
00484   mb->wr_ptr (tmp.wr_ptr ());
00485 
00486   // Remove the DONT_DELETE flags from mb
00487   mb->clr_self_flags (ACE_Message_Block::DONT_DELETE);
00488 
00489   return 0;
00490 }
00491 
00492 size_t
00493 ACE_CDR::total_length (const ACE_Message_Block* begin,
00494                        const ACE_Message_Block* end)
00495 {
00496   size_t l = 0;
00497   // Compute the total size.
00498   for (const ACE_Message_Block *i = begin;
00499        i != end;
00500        i = i->cont ())
00501     l += i->length ();
00502   return l;
00503 }
00504 
00505 void
00506 ACE_CDR::consolidate (ACE_Message_Block *dst,
00507                       const ACE_Message_Block *src)
00508 {
00509   if (src == 0)
00510     return;
00511 
00512   size_t newsize =
00513     ACE_CDR::first_size (ACE_CDR::total_length (src, 0)
00514                          + ACE_CDR::MAX_ALIGNMENT);
00515   dst->size (newsize);
00516 
00517   // We must copy the contents of <src> into the new buffer, but
00518   // respecting the alignment.
00519   ptrdiff_t srcalign =
00520     ptrdiff_t(src->rd_ptr ()) % ACE_CDR::MAX_ALIGNMENT;
00521   ptrdiff_t dstalign =
00522     ptrdiff_t(dst->rd_ptr ()) % ACE_CDR::MAX_ALIGNMENT;
00523   int offset = srcalign - dstalign;
00524   if (offset < 0)
00525     offset += ACE_CDR::MAX_ALIGNMENT;
00526   dst->rd_ptr (offset);
00527   dst->wr_ptr (dst->rd_ptr ());
00528 
00529   for (const ACE_Message_Block* i = src;
00530        i != 0;
00531        i = i->cont ())
00532     {
00533       dst->copy (i->rd_ptr (), i->length ());
00534     }
00535 }
00536 
00537 #if defined (NONNATIVE_LONGLONG)
00538 int
00539 ACE_CDR::LongLong::operator== (const ACE_CDR::LongLong &rhs) const
00540 {
00541   return this->h == rhs.h && this->l == rhs.l;
00542 }
00543 
00544 int
00545 ACE_CDR::LongLong::operator!= (const ACE_CDR::LongLong &rhs) const
00546 {
00547   return this->l != rhs.l || this->h != rhs.h;
00548 }
00549 #endif /* NONNATIVE_LONGLONG */
00550 
00551 #if defined (NONNATIVE_LONGDOUBLE)
00552 int
00553 ACE_CDR::LongDouble::operator== (const ACE_CDR::LongDouble &rhs) const
00554 {
00555   return ACE_OS::memcmp (this->ld, rhs.ld, 16) == 0;
00556 }
00557 
00558 int
00559 ACE_CDR::LongDouble::operator!= (const ACE_CDR::LongDouble &rhs) const
00560 {
00561   return ACE_OS::memcmp (this->ld, rhs.ld, 16) != 0;
00562 }
00563 #endif /* NONNATIVE_LONGDOUBLE */
00564 
00565 #if defined(_UNICOS) && !defined(_CRAYMPP)
00566 // placeholders to get things compiling
00567 ACE_CDR::Float::Float()
00568 {
00569 }
00570 
00571 ACE_CDR::Float::Float(const float & init)
00572 {
00573 }
00574 
00575 ACE_CDR::Float &
00576 ACE_CDR::Float::operator= (const float &rhs)
00577 {
00578   return *this;
00579 }
00580 
00581 int
00582 ACE_CDR::Float::operator!= (const ACE_CDR::Float &rhs) const
00583 {
00584   return 0;
00585 }
00586 #endif /* _UNICOS */

Generated on Mon Jun 16 11:19:19 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002