This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: optimize for multicore
- From: Andrew Haley <aph at redhat dot com>
- To: chronek <amvchronosek at interia dot pl>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Fri, 18 Jan 2013 09:24:46 +0000
- Subject: Re: optimize for multicore
- References: <1358496837438-905972.post@n5.nabble.com>
On 01/18/2013 08:13 AM, chronek wrote:
> I have Debian testing distro with gcc 4.7.2 running on virtualbox where
> assigned 8 cores and have some questions regarding gcc optimize flags. I
> want run mencoder to filter big resolution video with uspp (that filter
> calling snow encoder for encode/decode and avarage result (snow from ffmpeg
> what is compiling with mencoder)). I use simple flags like -O3 -march=native
> -mtune=native -mssse3 -fomit-from-pointer (cause it is virtual host it see
> my i7 like core2 with max ssse3 instruction).
> Is a way to compile for use more than one core/thread without changes in
> sources, only just by add optimize flags? What flag would be best for
> virtual host and speed up filtering? Is a way to check if it is memory or
> cpu problem? (filtering with max quality filter on fullhd source is 1 thread
> and 0.23 fps speed)
GCC has auto-vectorization, which helps with some loops, but I doubt
that it'll help you. http://gcc.gnu.org/projects/tree-ssa/vectorization.html
Video encoding can benefit considerably from multiple cores, but it
really needs the programmer to split the code into separate tasks.
Andrew.