comp.lang.ada
 help / color / mirror / Atom feed
From: "Marc A. Criley" <mcq95@earthlink.net>
Subject: Re: Making a package safe for use by multiple tasks
Date: Fri, 07 Jun 2002 11:11:47 GMT
Date: 2002-06-07T11:11:47+00:00	[thread overview]
Message-ID: <3D00956A.E19C904A@earthlink.net> (raw)
In-Reply-To: adq0le$2np$1@nets3.rz.RWTH-Aachen.DE

Alexander Boucke wrote:
> 
> Hello!
> 
> I am just playing with the idea to use multiple tasks in a programm doing
> linear algebra. The problem lies in my vector-algebra package, that uses
> some global tmp-object to optimize memory use and reuse. To give you the
> idea, some not necessarily correct code snippets what this is doing:
> 
  <snip>

> This is of course not usable if I use more then one task! And converting the
> whole thing in some kind of protected type is certainly not very useful,
> since this would it would not allow parallel execution of vector operations
> then.
> 
> Except of getting rid of these tmp_vec things, does anybody of you have an
> idea, how this could be dealt with. The idea is, that every task needs to
> have it's own temporary object. But I have no idea how this could be be
> achieved in an automatic or semi-automatic way.

Just off the top of my head...I don't know if this would be practical
for you or not, but if you just want to try something quick and dirty,
you could try this:

Convert the package into a generic package, i.e., just add "generic" to
the package spec, then instantiate an instance of the package for each
task.

It's an inelegant and wasteful hack, but hey, I warned you that it was
quick and dirty :-) :-)

Marc A. Criley
Consultant
Quadrus Corporation
www.quadruscorp.com



  reply	other threads:[~2002-06-07 11:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-07 10:07 Making a package safe for use by multiple tasks Alexander Boucke
2002-06-07 11:11 ` Marc A. Criley [this message]
2002-06-07 11:47   ` Alexander Boucke
2002-06-07 13:31 ` Dr. Michael Paus
2002-06-07 13:44   ` Making a package safe for use by multiple tasks (Correction) Dr. Michael Paus
2002-06-07 15:00 ` Making a package safe for use by multiple tasks Ted Dennison
2002-06-07 16:37 ` Georg Bauhaus
2002-06-07 21:16 ` Jeffrey Carter
2002-06-08 13:14   ` Craig Carey
2002-06-08 13:39     ` Dr. Michael Paus
  -- strict thread matches above, loose matches on Subject: below --
2002-06-07 10:14 Grein, Christoph
2002-06-07 10:29 ` Alexander Boucke
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox