• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: std::swap
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: std::swap


  • Subject: Re: std::swap
  • From: Jerry <email@hidden>
  • Date: Tue, 26 Jul 2005 08:52:46 +0100


On 25 Jul 2005, at 19:50, James Milne wrote:


On Monday, July 25, 2005, at 07:46PM, Mike Jackson <email@hidden> wrote:


I was handed this piece of "cross platform" code and Xcode is  
complaining on compile:

The code:

  template < class Matrix_ > static void transpose ( Matrix_ &m )
  {
    std::swap ( m[1],  m[4]  );
    std::swap ( m[2],  m[8]  );
    std::swap ( m[3],  m[12] );
    std::swap ( m[6],  m[9]  );
    std::swap ( m[7],  m[13] );
    std::swap ( m[11], m[14] );
  }

The Compile Error:
/Usul/Math/Matrix44.h:143: error: 'swap' is not a member of 'std'

I have used stuff from std before.. Is there an include that I need  
to do?


Alternatively if some nice soul would like to point me to the AltiVec  
function that can simply transpose a 4x4 matrix of floats, that would  
be nice. Tried looking in BLAS but there does not seem to be any  
easily reachable documentation to read.


You could try veclib/vectorOps.h:

/*************************************************************
 vSgetmi performs general matrix transpose (in place).                                         
    size        is the number of rows and columns   
                in matrix x                         
*************************************************************/
/*
 *  vSgetmi()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in vecLib.framework
 *    CarbonLib:        not in Carbon, but vecLib is compatible with CarbonLib
 *    Non-Carbon CFM:   in vecLib 1.0 and later
 */
extern void 
vSgetmi(
  int32_t   size,
  vFloat    x[])                                              AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER;


Jerry
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >std::swap (From: Mike Jackson <email@hidden>)
 >Re: std::swap (From: James Milne <email@hidden>)

  • Prev by Date: Re: Invalid PCH file warning?
  • Next by Date: Re: Project rebuilding unneccessarily
  • Previous by thread: Re: std::swap
  • Next by thread: Undefined symbols insanity after upgrading to Xcode 2.1...
  • Index(es):
    • Date
    • Thread