|
From: Mailing l. u. f. U. C. a. U. <kal...@li...> - 2013-07-25 12:46:55
|
Hi, I don't know much about the compile time assertions in C++, but probably we could check if icpc(presumably it defines the relevant macros) is used and if so we could use another implementation of KALDI_COMPILE_TIME_ASSERT, which doesn't rely on templates. Maybe something like C_ASSERT macro from Windows(http://msdn.microsoft.com/en-us/library/ms679289.aspx)? Vassil On Thu, Jul 25, 2013 at 1:35 PM, Mailing list used for User Communication and Updates <kal...@li...> wrote: > Hi, kaldi developers > > I tried to compile trunk with icc/icpc. > But I found only one line incompatible to icpc. > Maybe you guys want to fix it. > > > > > Here's the kaldi code failed in icpc compiling. > > icpc -m64 -msse -msse2 -Wall -I.. -DKALDI_DOUBLEPRECISION=0 > -DHAVE_POSIX_MEMALIGN -Wno-sign-compare -Winit-self -DHAVE_EXECINFO_H=1 > -rdynamic -DHAVE_CXXABI_H -DHAVE_MKL > -I/opt/intel/composer_xe_2013.1.117/mkl/include > -I/data/sykang/work/asr/kaldi/trunk/tools/openfst/include -Wno-sign-compare > -O3 -DNDEBUG -DHAVE_CUDA -I/usr/local/cuda/include -c -o push-lattice.o > push-lattice.cc > > push-lattice.cc(131): error: non-integral operation not allowed in nontype > template argument KALDI_COMPILE_TIME_ASSERT(static_cast<StateId>(-1) < > static_cast<StateId>(0) && > ^ > > push-lattice.cc(131): error: class > "KaldiCompileTimeAssert<<error-constant>>" has no member "Check" > KALDI_COMPILE_TIME_ASSERT(static_cast<StateId>(-1) < > static_cast<StateId>(0) && > ^ > > compilation aborted for push-lattice.cc (code 2) > > > > > It seems the following line can only be compiled by g++. > KALDI_COMPILE_TIME_ASSERT(true && "string"); > > I also posted a demo code on intel's dev forum. > http://software.intel.com/en-us/forums/topic/402465 > > > > > kangshiyin > > > ------------------------------------------------------------------------------ > See everything from the browser to the database with AppDynamics > Get end-to-end visibility with application monitoring from AppDynamics > Isolate bottlenecks and diagnose root cause in seconds. > Start your free trial of AppDynamics Pro today! > http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk > _______________________________________________ > Kaldi-users mailing list > Kal...@li... > https://lists.sourceforge.net/lists/listinfo/kaldi-users > |