2

How to implement efficient sorting algorithms for multiple processors in Scala? Here's the link for radix algorithm in GPU:

radix algorithm in GPU

2
  • Do you want Scala to see how to compete with the GPU solution, or to try to implement it on the processor in Scala, or to have Scala be able to access the GPU in the implementation? Commented Nov 9, 2009 at 0:20
  • I'm trying to implement it on the processor in Scala. Commented Nov 9, 2009 at 10:27

1 Answer 1

3

Use scala.actors.Futures. It isn't a good solution, because you are talking about parallel computation, not concurrent computation, and Futures is aimed at the latter, not the former.

Things like parallel arrays that are coming with Java 7 and a later (not 2.8) version of Scala are more appropriate for parallel algorithms.

Just explaining, a parallel algorithm is one which does the same computation on multiple processing units. It is easy to see that each of which runs the same code. A concurrent computation is one in which each processing unit is running a potentially different code.

Also related, in parallel algorithms, the code being run doesn't change, only the data. In concurrent computation you have code changing constantly.

By the way, though that is not what you are asking, let me state that there's a library for Scala to run OpenCL code (ie, run computation on GPU). It's called ScalaCL.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.