[mlpack-svn] [MLPACK] #269: gcc4.8 (c++11) compiling issue

MLPACK Trac trac at coffeetalk-1.cc.gatech.edu
Wed Feb 20 23:20:43 EST 2013


#269: gcc4.8 (c++11) compiling issue
------------------------+---------------------------------------------------
  Reporter:  bianjiang  |        Owner:  rcurtin 
      Type:  wishlist   |       Status:  accepted
  Priority:  major      |    Milestone:          
 Component:  mlpack     |   Resolution:          
  Keywords:             |     Blocking:          
Blocked By:             |  
------------------------+---------------------------------------------------

Comment (by rcurtin):

 So are you saying that the build fails with clang?  If that is true, I'll
 look into it.  I'll leave the ticket open until I verify that the build
 works with clang.

 You aren't the first person to suggest abstracting away matrix libraries
 (although you are the second).  We thought about it early on, but the
 reason we avoided it was basically that it would take a huge amount of
 effort to maintain an abstract interface, and for too little benefit.  A
 much older version of MLPACK wrapped its own matrix and vector classes,
 and once its designer left, it quickly fell into disrepair and it was
 unmaintainable to begin with (which is a large part of why it's gone now).

 Fortunately, most matrix libraries store a double* internally (or whatever
 type the matrix is).  Armadillo has a constructor with which you can
 specify "auxiliary memory" -- that is, you can make an ALGLIB
 real_2d_array, and then wrap an Armadillo object around it with the first
 advanced constructor in the list given
 [http://arma.sourceforge.net/docs.html#Mat here].  Most matrix libraries
 you might use otherwise should support similar operations.

 Also, it looks like ap::template_1d_array<> has a function called
 'getcontent()' which you could use to access the memory directly, but
 ap::template_2d_array<> confusingly does not.  You'd have to do something
 backhanded and ugly like getting the address of
 ap::template_2d_array<>::operator(0, 0).  But it would work...

-- 
Ticket URL: <http://trac.research.cc.gatech.edu/fastlab/ticket/269#comment:3>
MLPACK <www.fast-lab.org>
MLPACK is an intuitive, fast, and scalable C++ machine learning library developed by the FASTLAB at Georgia Tech under Dr. Alex Gray.


More information about the mlpack-svn mailing list