OpenMP in Nvidia Jeston

General OpenMP discussion
Forum rules
The OpenMP Forums are now closed to new posts. Please visit Stack Overflow if you are in need of help: https://stackoverflow.com/questions/tagged/openmp
Locked
FelipeVW
Posts: 1
Joined: Fri May 01, 2020 5:52 am

OpenMP in Nvidia Jeston

Post by FelipeVW »

Hi,

I am new to OpenMP and I was wondering if I could include it in my C++ program which is running in my Nvidia Jetson Nano and which has a multicore ARM processor.
Also, I don't understand what advantatges OpenMP can provide me in comparison to standard C++ threads or boost C++ threads.

Thank you for your time

MarkB
Posts: 808
Joined: Thu Jan 08, 2009 10:12 am
Location: EPCC, University of Edinburgh

Re: OpenMP in Nvidia Jeston

Post by MarkB »

FelipeVW wrote:I am new to OpenMP and I was wondering if I could include it in my C++ program which is running in my Nvidia Jetson Nano and which has a multicore ARM processor.
Most likely, yes - which compiler are you using?
FelipeVW wrote:Also, I don't understand what advantatges OpenMP can provide me in comparison to standard C++ threads or boost C++ threads.
This depends a bit on the type of code you want to run. OpenMP is mostly good for applications where you want to create a fixed number of threads all executing more-or-less the same code - it offers a bunch of high-level parallel programming constructs (e.g. parallel loops, reductions, tasks) which you won't find in the thread libraries. If want to write code that arbitrarily creates/destroys threads, or puts them to sleep and wakes them up, then OpenMP is less suited to this. And, depending a bit on the compiler version, OpenMP may not work with recent C++ features. Performance-wise, it probably makes little difference which API you use.

Locked