comp.lang.ada
 help / color / mirror / Atom feed
* sorting using dynamic tasks
@ 2000-04-29  0:00 Mark Verstege
  2000-04-30  0:00 ` tmoran
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Verstege @ 2000-04-29  0:00 UTC (permalink / raw)


Hi,

Does anyone know how to implement a sorting algorithm using dataflow
networks with semaphores in Ada? (I know about semaphores, it's the sorting
problem that I can't figure out.)

I'm trying to use semaphores, and get integers from standard input. I am
trying to create dynamicly allocated task types to do it. In other words, I
keep retrieving values and create a binary tree like dataflow of tasks.
When I have all input, then values are sent back up each level one by one,
when the parent task is ready to read the next value.

Regards,
	Mark





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: sorting using dynamic tasks
  2000-04-29  0:00 sorting using dynamic tasks Mark Verstege
@ 2000-04-30  0:00 ` tmoran
  2000-05-01  0:00   ` Mark Verstege
  0 siblings, 1 reply; 8+ messages in thread
From: tmoran @ 2000-04-30  0:00 UTC (permalink / raw)


>Does anyone know how to implement a sorting algorithm using dataflow
>networks with semaphores in Ada? (I know about semaphores, it's the sorting
  Do you mean "Batcher's Parallel Sort" from Knuth?  I don't remember
much about it, except it was my first Ada tasking program. ;)




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: sorting using dynamic tasks
  2000-05-01  0:00   ` Mark Verstege
@ 2000-05-01  0:00     ` tmoran
  2000-05-03  0:00       ` Robert Dewar
  0 siblings, 1 reply; 8+ messages in thread
From: tmoran @ 2000-05-01  0:00 UTC (permalink / raw)


I sent the code for "Batcher's parallel sort" via e-mail.
Pardon the coding style - that's how I wrote Ada in 1988.  My only
change was modular types instead of a library "and" routine.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: sorting using dynamic tasks
  2000-04-30  0:00 ` tmoran
@ 2000-05-01  0:00   ` Mark Verstege
  2000-05-01  0:00     ` tmoran
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Verstege @ 2000-05-01  0:00 UTC (permalink / raw)


No I hadn't heard of it. Do you have code for it by any chance?


Any help appreciated,

Mark

tmoran@bix.com wrote in article <BU1P4.946$Q47.807166@news.pacbell.net>...
> >Does anyone know how to implement a sorting algorithm using dataflow
> >networks with semaphores in Ada? (I know about semaphores, it's the
sorting
>   Do you mean "Batcher's Parallel Sort" from Knuth?  I don't remember
> much about it, except it was my first Ada tasking program. ;)
> 




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: sorting using dynamic tasks
  2000-05-01  0:00     ` tmoran
@ 2000-05-03  0:00       ` Robert Dewar
  2000-05-03  0:00         ` tmoran
  2000-05-03  0:00         ` Alfred Hilscher
  0 siblings, 2 replies; 8+ messages in thread
From: Robert Dewar @ 2000-05-03  0:00 UTC (permalink / raw)


In article <Yf9P4.572$Q_.832841@news.pacbell.net>,
  tmoran@bix.com wrote:
> I sent the code for "Batcher's parallel sort" via e-mail.
> Pardon the coding style - that's how I wrote Ada in 1988.  My
only
> change was modular types instead of a library "and" routine.

Hmmm! this is of course a very typical assignment. Perhaps
you should put this code up on the web.

It is amazing how often students think they can submit
stuff they find on the web as their own work :-) (*)

For example, submit it to adapower as an example.

(*) What is even more surprising is thinking they can get away
with it.

I am not saying this is true of the current case, though it
might well be. Just that if you send code to people who *might*
be asking for an assignment solution, then posting it somewhere
on the web is a useful procedure. If they are not asking for
help on an assignment, then they will welcome such posting.
If they ARE asking for such help, then posting on the web
will keep things honest :-)



Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: sorting using dynamic tasks
  2000-05-03  0:00       ` Robert Dewar
  2000-05-03  0:00         ` tmoran
@ 2000-05-03  0:00         ` Alfred Hilscher
  2000-05-03  0:00           ` Ted Dennison
  1 sibling, 1 reply; 8+ messages in thread
From: Alfred Hilscher @ 2000-05-03  0:00 UTC (permalink / raw)




Robert Dewar wrote:
> It is amazing how often students think they can submit
> stuff they find on the web as their own work :-) (*)
> (*) What is even more surprising is thinking they can get away
> with it.

Sad, but true: in many cases they can. Many of my colleaques who never
did their own work have now great success in their job. 

Maybe it's a handicap to be to intelligent ? ;-)




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: sorting using dynamic tasks
  2000-05-03  0:00         ` Alfred Hilscher
@ 2000-05-03  0:00           ` Ted Dennison
  0 siblings, 0 replies; 8+ messages in thread
From: Ted Dennison @ 2000-05-03  0:00 UTC (permalink / raw)


In article <391026A2.8D482B69@icn.siemens.de>,
  Alfred Hilscher <Alfred.Hilscher@icn.siemens.de> wrote:

> Sad, but true: in many cases they can. Many of my colleaques who never
> did their own work have now great success in their job.

Are they *still* not doing their own work? I know such folks are out
there. I don't think it'd be a fun existence, though.

--
T.E.D.

http://www.telepath.com/~dennison/Ted/TED.html


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: sorting using dynamic tasks
  2000-05-03  0:00       ` Robert Dewar
@ 2000-05-03  0:00         ` tmoran
  2000-05-03  0:00         ` Alfred Hilscher
  1 sibling, 0 replies; 8+ messages in thread
From: tmoran @ 2000-05-03  0:00 UTC (permalink / raw)


> > I sent the code for "Batcher's parallel sort" via e-mail.
>
> Hmmm! this is of course a very typical assignment. Perhaps
> you should put this code up on the web.
> For example, submit it to adapower as an example.
  I have in fact submitted it to AdaPower.  It was already out
there in public (posted on Byte Information Exchange in 1988), as
well as in Knuth Volume 3.  The style is sufficiently odd that a
student turning it in as his own would certainly have to change the
style, at the very least, or even the least suspicious teacher
would notice.  Since the original poster actually asked for tasking
using semaphores this is probably not his homework solution.  It
does use tasks to do sorting, and thus might be helpful to him.




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2000-05-03  0:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-29  0:00 sorting using dynamic tasks Mark Verstege
2000-04-30  0:00 ` tmoran
2000-05-01  0:00   ` Mark Verstege
2000-05-01  0:00     ` tmoran
2000-05-03  0:00       ` Robert Dewar
2000-05-03  0:00         ` tmoran
2000-05-03  0:00         ` Alfred Hilscher
2000-05-03  0:00           ` Ted Dennison

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