[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Parallella Community • View topic - How to shrink your C++ code to fit on an Epiphany core

How to shrink your C++ code to fit on an Epiphany core

A forum for documenting the Parallella and Epiphany . (Not Q&A!)

How to shrink your C++ code to fit on an Epiphany core

Postby Gravis » Tue Apr 21, 2015 12:50 pm

Last edited by Gravis on Wed Apr 22, 2015 7:57 pm, edited 2 times in total.
User avatar
Gravis
 
Posts: 445
Joined: Mon Dec 17, 2012 3:27 am
Location: East coast USA.

Re: How to shrink your C++ code to fit on an Epiphany core

Postby piotr5 » Wed Apr 22, 2015 9:43 am

thanks for your hints and suggestions. there's one point I'm unsure of though: -fno-default-inline
as far as I have seen most people put only wrappers in the class-definition.
for example when porting a c-lib to c++ class structure. it makes sense to inline those!
everything else is then put elsewhere in the header or an external header file to be included there.
but then, maybe gcc will automatically optimize out wrapper functions anyway?
or will the wrapper function then linger around in the executable, never to be used?

also I should mention, using c++1y might not be a good idea. maybe better compromise for c++14?

as for not being allowed to use c++stdlib, anybody knows of a smaller lib?
any replacement for utf8 string-manipulation?
piotr5
 
Posts: 230
Joined: Sun Dec 23, 2012 2:48 pm

Re: How to shrink your C++ code to fit on an Epiphany core

Postby Gravis » Wed Apr 22, 2015 7:30 pm

User avatar
Gravis
 
Posts: 445
Joined: Mon Dec 17, 2012 3:27 am
Location: East coast USA.

Re: How to shrink your C++ code to fit on an Epiphany core

Postby piotr5 » Wed Apr 22, 2015 10:08 pm

you're right, thanks for the helpful hints.
piotr5
 
Posts: 230
Joined: Sun Dec 23, 2012 2:48 pm

Re: How to shrink your C++ code to fit on an Epiphany core

Postby dobkeratops » Wed Jul 08, 2015 11:01 am

dobkeratops
 
Posts: 189
Joined: Fri Jun 05, 2015 6:42 pm
Location: uk

Re: How to shrink your C++ code to fit on an Epiphany core

Postby piotr5 » Thu Jul 16, 2015 6:28 am

imho any hybrid-architecture like coprocessors and such is not fit for call-backs and the related stuff. maybe compilers should store a 2d-list of function-addresses, one entry per core? suppose you had an epiphany with 1024 cores, should every callback come with a list of 1025 function-variants and 1025 copies of that single function? I don't think so, 2 copies are enough, epiphany can execute code stored on other cores. if you're using callbacks you likely don't need high speed. however, c++ has an interesting feature, it can treat a fixed function as if it were a callback, thereby those functions are stored on the individual cores which can read the object. i.e. at compile-time the actual function being used is determined by template-parameters. with such a feature, what do you need vtables for? well, of course if datatype isn't known at compile-time...
piotr5
 
Posts: 230
Joined: Sun Dec 23, 2012 2:48 pm

Re: How to shrink your C++ code to fit on an Epiphany core

Postby paran » Thu Jul 16, 2015 12:06 pm

Thanks for hints. They are very helpful.
paran
 
Posts: 53
Joined: Sat Jun 28, 2014 5:22 pm
Location: Georgetown, Ontario, Canada


Return to Quick Start Guides , Documentation, Examples (Start Here!)

Who is online

Users browsing this forum: No registered users and 3 guests

cron