[mlpack-svn] [MLPACK] #214: Compile errors when 64 bit support is enabled in armadillo 2.4.0 (patches included)
MLPACK Trac
trac at coffeetalk-1.cc.gatech.edu
Tue Mar 20 22:05:32 EDT 2012
#214: Compile errors when 64 bit support is enabled in armadillo 2.4.0 (patches
included)
----------------------+-----------------------------------------------------
Reporter: andreasl | Owner:
Type: defect | Status: new
Priority: major | Milestone:
Component: mlpack | Keywords:
Blocking: | Blocked By:
----------------------+-----------------------------------------------------
Armadillo supports 64-bit operating systems if ARMA_64BIT_WORD is enabled
by editing include/armadillo_bits/config.hpp in the armadillo source
directory. While CMAKE doesn't add this flag by default on a 64 bit system
yet, it can still be enabled before compiling the library to add 64 bit
support to armadillo.
When this flag is set, there are two different types of compile errors
that show up.
The first one is that there are duplicate typedefs in
src/mlpack/core/arma_extend/promote_type.hpp. Not all of the typedefs are
duplicated, so I have added preprocessor macros surrounding the affected
typedefs.
The second set of compile errors are caused by the usage of armadillo's
u32 datatype instead of the uword datatype. When armadillo is compiled
without 64 bit support, uword is the same as u32, when armadillo is
compiled with 64 bit support, uword corresponds to u64.
When using armadillo with 64 bit support, mlpack's reliance on u32 causes
multiple compile errors when mlpack is calling functions that expect a u64
instead of u32.
I changed all instances of u32 to uword in the mlpack sourcetree (by using
find and sed) except for promote_type.hpp.
With these two sets of changes, mlpack is compiling successfully with
proper 64-bit support and all of the unit tests seem to pass.
I have attached two seperate patches for these two sets of issues, created
against svn revision 11921.
Both patches were created from inside the src directory.
--
Ticket URL: <https://trac.research.cc.gatech.edu/fastlab/ticket/214>
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