#13352: Running time improvement of the bitset_len method
---------------------------------+----------------------------
       Reporter:  dcoudert       |        Owner:  jason
           Type:  enhancement    |       Status:  needs_review
       Priority:  major          |    Milestone:  sage-5.12
      Component:  misc           |   Resolution:
       Keywords:                 |    Merged in:
        Authors:  David Coudert  |    Reviewers:
Report Upstream:  N/A            |  Work issues:
         Branch:                 |       Commit:
   Dependencies:                 |     Stopgaps:
---------------------------------+----------------------------

Comment (by ncohen):

 I meant your patch, without modifications. As for the errors you get, I
 think it's because the file gets compiled with gcc instead of g++. Volker
 said that it should be sufficient to make it a .cc file, and that GCC
 would take the hint and use the right compiler instead. It does work when
 outside of Sage :

 {{{
 ~$ cp a.cc a.c
 ~$ gcc a.c -o a
 a.c:31:12: error: redefinition of ‘popcount’
  inline int popcount(unsigned int i){
             ^
 a.c:26:12: note: previous definition of ‘popcount’ was here
  inline int popcount(unsigned int i){
             ^
 a.c:35:12: error: redefinition of ‘popcountl’
  inline int popcountl(unsigned long i){
             ^
 a.c:10:12: note: previous definition of ‘popcountl’ was here
  inline int popcountl(unsigned long i){
             ^
 ~$ gcc a.cc -o a
 ~$
 }}}

 Though there does not seem to be anything wrong with "default" on my
 computer. Which version of gcc are you using ? It's probably < 4.8.

 Nathann

--
Ticket URL: <http://trac.sagemath.org/ticket/13352#comment:24>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to