Re: [fpc-pascal] Common OpenMP syntax?

2006-07-27 Thread Andreas Berger
Steve Williams wrote: Michael Van Canneyt wrote: Which is why I think that it's better to have them as local functions, instead of having to introduce a lot of new functions. Local functions are very pascal-ish. C doesn't have it, which is why they can't use it. Let's

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-27 Thread Vinzent Hoefler
On Wednesday 26 July 2006 10:05, Andreas Berger wrote: Steve Williams wrote: Michael Van Canneyt wrote: Which is why I think that it's better to have them as local functions, instead of having to introduce a lot of new functions. Local functions are very pascal-ish. C doesn't have it,

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-27 Thread Alexandre Leclerc
2006/7/27, Vinzent Hoefler [EMAIL PROTECTED]: On Wednesday 26 July 2006 10:05, Andreas Berger wrote: Steve Williams wrote: Michael Van Canneyt wrote: Which is why I think that it's better to have them as local functions, instead of having to introduce a lot of new functions. Local

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-27 Thread Vinzent Hoefler
On Thursday 27 July 2006 12:53, Alexandre Leclerc wrote: Then we could very simply have: parallel procedure ParallelBlock; parallel function ParallelFunction; //if this can happen... Yes. I thought of something like that, because it could quite easily match with a parallel for construct.

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-26 Thread Micha Nelissen
Vinzent Hoefler wrote: Well, I just added some stuff there, yesterday. It's far from being complete yet (it just covers a basic parallel construct), nor is it really thought through yet, but well, it might be a start; something to begin with. Any suggestions are welcome, of course. Does

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-26 Thread Vinzent Hoefler
On Wednesday 26 July 2006 08:17, Micha Nelissen wrote: Vinzent Hoefler wrote: Well, I just added some stuff there, yesterday. It's far from being complete yet (it just covers a basic parallel construct), nor is it really thought through yet, but well, it might be a start; something to

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-26 Thread Michael Van Canneyt
On Wed, 26 Jul 2006, Vinzent Hoefler wrote: On Wednesday 26 July 2006 08:17, Micha Nelissen wrote: Vinzent Hoefler wrote: Well, I just added some stuff there, yesterday. It's far from being complete yet (it just covers a basic parallel construct), nor is it really thought through

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-26 Thread Micha Nelissen
Vinzent Hoefler wrote: On Wednesday 26 July 2006 08:17, Micha Nelissen wrote: Does parallel mean all the statements in the block can be executed in parallel, or that multiple copies of the block of statements can be started in parallel ? The latter. Strange. How many copies ?

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-26 Thread Vinzent Hoefler
On Wednesday 26 July 2006 09:07, Micha Nelissen wrote: Vinzent Hoefler wrote: On Wednesday 26 July 2006 08:17, Micha Nelissen wrote: Does parallel mean all the statements in the block can be executed in parallel, or that multiple copies of the block of statements can be started in

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-26 Thread Vincent Snijders
Micha Nelissen schreef: Vinzent Hoefler wrote: On Wednesday 26 July 2006 08:17, Micha Nelissen wrote: Does parallel mean all the statements in the block can be executed in parallel, or that multiple copies of the block of statements can be started in parallel ? The latter. Strange. How many

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-26 Thread Micha Nelissen
Vinzent Hoefler wrote: On Wednesday 26 July 2006 09:07, Micha Nelissen wrote: How many copies ? Omp.Get_Num_Threads(), AFAICS. Ah the number of threads is determined by the RTL, and any parallel block must be written flexible, so that it can work for any given number of threads ? Micha

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-26 Thread Vinzent Hoefler
On Wednesday 26 July 2006 09:00, Michael Van Canneyt wrote: On Wed, 26 Jul 2006, Vinzent Hoefler wrote: On Wednesday 26 July 2006 08:17, Micha Nelissen wrote: Vinzent Hoefler wrote: Well, I just added some stuff there, yesterday. It's far from being complete yet (it just covers a

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-26 Thread Steve Williams
Michael Van Canneyt wrote: Which is why I think that it's better to have them as local functions, instead of having to introduce a lot of new functions. Local functions are very pascal-ish. C doesn't have it, which is why they can't use it. Let's use the language features to their full extent.

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-26 Thread Steve Williams
Steve Williams wrote: *begin* SubTask(x); *end* /{Sub}/; *var* arr = *array*[0 .. ] *of* Float; *begin* / // Main program/ Sub (arr); *end*. Damn Thunderbird. -- Sly This message and its attachments may contain legally privileged or confidential

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-26 Thread Vinzent Hoefler
On Wednesday 26 July 2006 09:25, Micha Nelissen wrote: Vinzent Hoefler wrote: On Wednesday 26 July 2006 09:07, Micha Nelissen wrote: How many copies ? Omp.Get_Num_Threads(), AFAICS. Ah the number of threads is determined by the RTL, and any parallel block must be written flexible, so

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-26 Thread Vincent Snijders
Michael Van Canneyt schreef: On Wed, 26 Jul 2006, Vinzent Hoefler wrote: On Wednesday 26 July 2006 08:17, Micha Nelissen wrote: Vinzent Hoefler wrote: Well, I just added some stuff there, yesterday. It's far from being complete yet (it just covers a basic parallel construct), nor is it

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-26 Thread Micha Nelissen
Michael Van Canneyt wrote: The latter. Which is why I think that it's better to have them as local functions, instead of having to introduce a lot of new functions. There is no real reason to restrict 'parallel' to local functions, is there ? Micha

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-26 Thread Vinzent Hoefler
On Wednesday 26 July 2006 09:28, Steve Williams wrote: Steve Williams wrote: *begin* SubTask(x); *end* /{Sub}/; *var* arr = *array*[0 .. ] *of* Float; *begin* / // Main program/ Sub (arr); *end*. Damn Thunderbird. Well, it tried to mimic my syntax

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-26 Thread Michael Van Canneyt
On Wed, 26 Jul 2006, Micha Nelissen wrote: Michael Van Canneyt wrote: The latter. Which is why I think that it's better to have them as local functions, instead of having to introduce a lot of new functions. There is no real reason to restrict 'parallel' to local functions, is

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-26 Thread Vinzent Hoefler
On Wednesday 26 July 2006 09:46, Michael Van Canneyt wrote: It seems obvious to me that a global function can be called in parallel at any time. The compiler can perfectly detect whether a global function writes to variables outside it's own scope, in which case it's probably a no-no to

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-26 Thread Michael Van Canneyt
On Wed, 26 Jul 2006, Vinzent Hoefler wrote: On Wednesday 26 July 2006 09:46, Michael Van Canneyt wrote: It seems obvious to me that a global function can be called in parallel at any time. The compiler can perfectly detect whether a global function writes to variables outside it's own

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-26 Thread Vinzent Hoefler
On Wednesday 26 July 2006 10:00, Michael Van Canneyt wrote: On Wed, 26 Jul 2006, Vinzent Hoefler wrote: On Wednesday 26 July 2006 09:46, Michael Van Canneyt wrote: It seems obvious to me that a global function can be called in parallel at any time. The compiler can perfectly detect

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-21 Thread Mattias Gaertner
On Fri, 21 Jul 2006 09:28:17 +1000 Steve Williams [EMAIL PROTECTED] wrote: Marc Weustink wrote: One of the pretexts behind OpenMP is that the code will still compile if OpenMP is not available or disabled on a particular compiler. Mwah... in that case you can still use the same

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-21 Thread Vinzent Höfler
John Coppens wrote: On Thu, 20 Jul 2006 21:11:49 +0200 Vinzent Höfler [EMAIL PROTECTED] wrote: Alan Burns? That's a name which rings a bell. You could have send the URL, though. ;) http://www-users.cs.york.ac.uk/~burns/pf.html Hmm, and taking a peek look at the examples, it doesn't really

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-21 Thread Vinzent Höfler
Marco van de Voort wrote: new keywords. Other compilers will give you warnings about illegal compiler directives. Bad assumption, the only one that matters, Delphi errors on unknown compiler directives. So you will have to ifdef anyway. (tested D6) Does Delphi support FPC style macros? In

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-21 Thread Marco van de Voort
Marco van de Voort wrote: new keywords. Other compilers will give you warnings about illegal compiler directives. Bad assumption, the only one that matters, Delphi errors on unknown compiler directives. So you will have to ifdef anyway. (tested D6) Does Delphi support FPC style

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-21 Thread Vinzent Höfler
Marco van de Voort wrote: Marco van de Voort wrote: new keywords. Other compilers will give you warnings about illegal compiler directives. Bad assumption, the only one that matters, Delphi errors on unknown compiler directives. So you will have to ifdef anyway. (tested D6) Does Delphi

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-21 Thread Steve Williams
Vinzent Höfler wrote: Marco van de Voort wrote: Marco van de Voort wrote: new keywords. Other compilers will give you warnings about illegal compiler directives. Bad assumption, the only one that matters, Delphi errors on unknown compiler directives. So you

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-21 Thread Jonas Maebe
On 21 Jul 2006, at 11:42, Marco van de Voort wrote: Other compilers will give you warnings about illegal compiler directives. Bad assumption, the only one that matters, Delphi errors on unknown compiler directives. So you will have to ifdef anyway. (tested D6) I think at least in this

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-21 Thread Marco van de Voort
On 21 Jul 2006, at 11:42, Marco van de Voort wrote: Bad assumption, the only one that matters, Delphi errors on unknown compiler directives. So you will have to ifdef anyway. (tested D6) I think at least in this case GPC also matters, since Florian is also soliciting feedback on

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-20 Thread Steve Williams
Florian Klaempfl wrote: I'am currently thinking about implementing OpenMP support in FPC. However, there is currently (to my knowledge) no pascal syntax defined for OpenMp support. Do you think we can find a common syntax to simplify things for users? I've some ideas how it be done, but I want

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-20 Thread Alexandre Leclerc
2006/7/20, Steve Williams [EMAIL PROTECTED]: Florian Klaempfl wrote: I'am currently thinking about implementing OpenMP support in FPC. However, there is currently (to my knowledge) no pascal syntax defined for OpenMp support. Do you think we can find a common syntax to simplify things for

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-20 Thread Marco van de Voort
Isn't there a copascal that already has established concurent pascal syntax? if not, the other wirthian languages look like logical providers? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-20 Thread Vinzent Höfler
Marco van de Voort wrote: Isn't there a copascal that already has established concurent pascal syntax? Yes, there is, but its syntax is very limited AFAICS. if not, the other wirthian languages look like logical providers? Ada tasking? Well, too much overkill, I think. ;) My problem with

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-20 Thread John Coppens
On Mon, 17 Jul 2006 21:12:31 +0200 Florian Klaempfl [EMAIL PROTECTED] wrote: I'am currently thinking about implementing OpenMP support in FPC. Florian, Have you looked at Pascal-FC (a language developped based Pascal/0, I believe, by Alan Burns)? I've used it to teach multiprogramming, and it

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-20 Thread Vinzent Höfler
John Coppens wrote: On Mon, 17 Jul 2006 21:12:31 +0200 Florian Klaempfl [EMAIL PROTECTED] wrote: I'am currently thinking about implementing OpenMP support in FPC. Florian, Have you looked at Pascal-FC (a language developped based Pascal/0, I believe, by Alan Burns)? Alan Burns? That's a

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-20 Thread Marc Weustink
Steve Williams wrote: Florian Klaempfl wrote: I'am currently thinking about implementing OpenMP support in FPC. However, there is currently (to my knowledge) no pascal syntax defined for OpenMp support. Do you think we can find a common syntax to simplify things for users? I've some ideas how

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-20 Thread Vinzent Höfler
Marc Weustink wrote: Steve Williams wrote: Using some of the documented examples in the v2.5 spec: Example A.1.1: procedure a1(n: Integer; a: PSingleArray; b: PSingleArray); var i: Integer; begin {$omp parallel for} for i := 1 to n - 1 do b^[i] := (a^[i] + a^[i - 1]) / 2.0; end;

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-20 Thread John Coppens
On Thu, 20 Jul 2006 21:11:49 +0200 Vinzent Höfler [EMAIL PROTECTED] wrote: Alan Burns? That's a name which rings a bell. You could have send the URL, though. ;) http://www-users.cs.york.ac.uk/~burns/pf.html Hmm, and taking a peek look at the examples, it doesn't really surprise me,

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-20 Thread Steve Williams
Marc Weustink wrote: Steve Williams wrote: I would suggest something along the lines of the C/C++ implementation, but using the Pascal form of compiler directives. Using some of the documented examples in the v2.5 spec: Example A.1.1: procedure a1(n: Integer; a: PSingleArray; b:

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-20 Thread Marc Weustink
Steve Williams wrote: Marc Weustink wrote: Steve Williams wrote: I would suggest something along the lines of the C/C++ implementation, but using the Pascal form of compiler directives. Using some of the documented examples in the v2.5 spec: Example A.1.1: procedure a1(n: Integer; a:

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-18 Thread Mattias Gaertner
On Mon, 17 Jul 2006 21:12:31 +0200 Florian Klaempfl [EMAIL PROTECTED] wrote: I'am currently thinking about implementing OpenMP support in FPC. There seems to be something in the air. I had the same idea two weeks ago. Well, to be honest, I had the idea as I heard of OpenMP 3 years ago, but now

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-18 Thread Alexandre Leclerc
2006/7/17, Mattias Gaertner [EMAIL PROTECTED]: On Mon, 17 Jul 2006 21:12:31 +0200 Florian Klaempfl [EMAIL PROTECTED] wrote: However, there is currently (to my knowledge) no pascal syntax defined for OpenMp support. Right. AFAIK OpenMP is only a standard for C/C++ and Fortran. It's not an

Re: [fpc-pascal] Common OpenMP syntax?

2006-07-18 Thread Marc Weustink
Florian Klaempfl [EMAIL PROTECTED] wrote: I'am currently thinking about implementing OpenMP support in FPC. Is this similar as polyphinic C# ? (you gave me a link a while ago) What I'm puzzeled with, usually an API specifies the interface to an external library, where here it seems a spec

[fpc-pascal] Common OpenMP syntax?

2006-07-17 Thread Florian Klaempfl
I'am currently thinking about implementing OpenMP support in FPC. However, there is currently (to my knowledge) no pascal syntax defined for OpenMp support. Do you think we can find a common syntax to simplify things for users? I've some ideas how it be done, but I want to hear other ideas first