How to force 'inline' with GCC or ICC

P

Patrick Laurent

On what grounds?

Because:
-I don't know good assembly
-I want a partable solution
-no suggestion is feasible in an reasonable time (it tends towards infinity)
Because you can't imagine any way doesn't mean it's not possible.
Can you or have you programmed signal processing with meta-programming? I
have not.
Could you give me internet pages, where meta-programming was succesful used
for signal processing or for any mathematical applications?
... so you *can* imagine a way to do it, then ...?
How do you know that?
I said 'I think', I could have said 'I suppose', or 'it seems'. I did not
say 'I know'. I am not good in english. If 'to think' means 'to know
something for sure', then I used the wrong verb. Did I?

I use a big template depth (reached once 36), and compilers already have
some difficulties.
GCC is for example far away from ICL to optimized my code. ICL is a clear
winner.
So meta-programming for FFT seems to be an utopie.
Patrick: Ioannis has offered a range of (to my mind reasonable and
helpful) suggestions which you have summarily trashed
without any hint of justification. How do we help you? You seem to be
after some magic quick fix - has it dawned on you
yet that perhaps there isn't one?
It seems indeed there is no magic fix. I don't wan't to reprogram everything
(in C or whatever) just to make GCC happy.
I asked on this topic if it is possible to bring GCC at the same speed as
ICL for my case, it seems it is not.

I close the debate
Thanks to everyone.
Patrick
 
C

Chris Theis

Patrick Laurent said:
Because:
-I don't know good assembly

This actually puts the comments you had on registers & optimization etc. in
a very interesting perspective...
-I want a partable solution

No, you certainly do not want a partable solution, but a portable solution
(note the spelling)
-no suggestion is feasible in an reasonable time (it tends towards
infinity)

On what grounds do you base this statement?
Can you or have you programmed signal processing with meta-programming? I
have not.

It's amazing that there are things that you have not yet seen ;-)
Could you give me internet pages, where meta-programming was succesful
used for signal processing or for any mathematical applications?

Yes, I can & I already did but you obviously did not read my postings
properly.
I said 'I think', I could have said 'I suppose', or 'it seems'. I did not
say 'I know'. I am not good in english. If 'to think' means 'to know
something for sure', then I used the wrong verb. Did I?

I use a big template depth (reached once 36), and compilers already have
some difficulties.
GCC is for example far away from ICL to optimized my code. ICL is a clear
winner.
So meta-programming for FFT seems to be an utopie.
Wrong.

It seems indeed there is no magic fix. I don't wan't to reprogram
everything (in C or whatever) just to make GCC happy.
I asked on this topic if it is possible to bring GCC at the same speed as
ICL for my case, it seems it is not.

You were told in the beginning that there is no magic fix for this, because
that is clearly what the language specification states about inlining. I'd
suggest that you go on and do some research about meta-templates, compiler
techniques, the inlining concept and optimization techniques. These are
conecepts on which you obviously have to catch up.

Cheers
Chris
 
P

Patrick Laurent

Chris, you do understand nothing.
Words, words, words, only words.
If you would have undestood one percent of my library, you would have seen,
that it is programmed with meta-programming.
What you call meta-programing, I call it generic C++.

You don't need to laugh at my english or misspelling of some words.
Learn Modesty!

Ich habe schon deine Programmierkenntnisse festgestellt, du blamierst dich
nur.

Höre auf jedes Forum durchzuwühlen, habet ihr doch im CERN nichts Besseres
zu tun?

Du solltest dir mit deiner Elektronen und anderen Higgs Bosons beschäftigen.

(Deutsch ist übrigens auch nicht meine Muttersprache)



Auf (nicht) Wiedersehen

Patrick
 
C

Chris Theis

Patrick Laurent said:
Chris, you do understand nothing.
Words, words, words, only words.
If you would have undestood one percent of my library, you would have
seen, that it is programmed with meta-programming.
What you call meta-programing, I call it generic C++.

You don't need to laugh at my english or misspelling of some words.
Learn Modesty!

Ich habe schon deine Programmierkenntnisse festgestellt, du blamierst dich
nur.

Höre auf jedes Forum durchzuwühlen, habet ihr doch im CERN nichts Besseres
zu tun?

Du solltest dir mit deiner Elektronen und anderen Higgs Bosons
beschäftigen.

(Deutsch ist übrigens auch nicht meine Muttersprache)



Auf (nicht) Wiedersehen

Patrick

Relax & take a deep breath. I certainly have better things to do than
wasting more time on this. Sorry for trying to help and I wish you good
luck!

Chris
 
Joined
Oct 6, 2006
Messages
1
Reaction score
0
Found the following

Hi,

I may be replying too late. Recently I faced the same issue
and then found an answer in
google search for
__attribute__((always_inline))
http://www.opendarwin.org/pipermail/webkit-unassigned/2005-December/000425.html

I tried
inline
ret_type
__attribute__((always_inline))
funcname(param_list)

Basically added the "__attribute__((always_inline))" before
function name and it did help me in g++ in speeding up things.

Note: I am not sure though, that this is the best way to force inline in g++.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top