Re: [Vala] OpenMP Support
- From: Gonzalo Aguilar Delgado <gaguilar aguilardelgado com>
- To: Adrià Arrufat <adria arrufat protonmail ch>
- Cc: "vala-list gnome org" <vala-list gnome org>
- Subject: Re: [Vala] OpenMP Support
- Date: Mon, 15 May 2017 10:49:33 +0200
Hi Adrià,
I think not only that, but also to recognize when this can be done and
where cannot. But I think that using most Glib types can be done if the
data structures are thread safe something I'm not aware of it. I suppose
it's not easy. But can be a great win to put vala at the same level of
scala and rust.
Best regards,
El 05/05/17 a las 09:41, Adrià Arrufat escribió:
I think it's an amazing idea, that's why I already filed a bug report:
https://bugzilla.gnome.org/show_bug.cgi?id=777452
However, I'm no expert on OpenMP: I've only used to parallelise for
loops using:
# pragma omp parallel for
I think it is not as straight forward as I thought in Vala, since for
loops are translated to while loops in C (from what I've seen) so that
you can declare the control loop variable inside the loop in C and
then check the condition to break the loop.
I guess, some work has to be done to allow this transition from Vala to C.
I might be wrong about the statements above, but it is what I thought
when I had a look at the generated C code for a loop.
Regards,
Adrià Arrufat
Sent from ProtonMail <https://protonmail.ch>, encrypted email based in
Switzerland.
-------- Original Message --------
Subject: [Vala] OpenMP Support
Local Time: May 4, 2017 10:11 AM
UTC Time: May 4, 2017 8:11 AM
From: gaguilar aguilardelgado com
To: vala-list gnome org
Hi,
Do you know what it would be great?
Let Vala insert the correct OpenMP hints into the C compiler code when
it detects OpenMP should be used on target system.
It can even generate two versions of the same code. One with OpenMP
support and other without it, controlled by define statements and enable
or disable them at build.
It means we can take advantage of multiprocessor most of the time
without really adding complexity to vala code.
Do you think is feasible?
Other idea I was digging into is a implementation of twitter finagle in
vala. It would be great to start building serious things outside the
pure gnome environment. Servers that are really scalable and built on
C... It would be great. Futures, Servers, Metrics... It opens the door
to great things...
What do you think?
Best regards,
_______________________________________________
vala-list mailing list
vala-list gnome org
https://mail.gnome.org/mailman/listinfo/vala-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]