Re: Matrix question
From: Minti (mintispamblock_at_yahoo.com)
Date: 09/06/04
- Next message: Michael Wojcik: "Re: Question about Sun JAVAC"
- Previous message: Minti: "Re: what does the header file stdio.h contain"
- In reply to: Kitty: "Matrix question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 6 Sep 2004 23:18:52 +0530
"Kitty" <No spam> wrote in message news:41394ff7_3@rain.i-cable.com...
> Given a matrix A[n], n is very large, I want to sum all the elements up.
> What is the fastest method to do that? Do you for-loop is the best one?
> Thanks.
>
>
The first solution that comes to my mind is to create n' number of threads.
Where n will be based on the value of n. Maybe n/4 or n/2.
Compute the sum for each of the threads.
Compute the total.
HTH
--
Imanpreet Singh Arora
isingh AT acm DOT org
If I would have only known, I would have been a locksmith.
-- Albert Einstein
- Next message: Michael Wojcik: "Re: Question about Sun JAVAC"
- Previous message: Minti: "Re: what does the header file stdio.h contain"
- In reply to: Kitty: "Matrix question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|