courses/parallel programming in java/miniproject_1/src/main/java/edu/coursera/parallel/ReciprocalArraySum.java
protected static double parManyTaskArraySum(final double[] input,
                                                final int numTasks) {
        ReciprocalArraySumTask task = new ReciprocalArraySumTask(0, input.length, input, numTasks);
        ForkJoinPool pool = new ForkJoinPool(numTasks);
        pool.invoke(task);
        return task.value;
    }
/**
     * TODO: Extend the work you did to implement parArraySum to use a set
     * number of tasks to compute the reciprocal array sum. You may find the
     * above utilities getChunkStartInclusive and getChunkEndExclusive helpful
     * in computing the range of element indices that belong to each chunk.
     *
     * @param input Input array
     * @param numTasks The number of tasks to create
     * @return The sum of the reciprocals of the array input
     */
Extend the work you did to implement parArraySum to use a set
number of tasks to compute the reciprocal array sum. You may find the
above utilities getChunkStartInclusive and getChunkEndExclusive helpful
in computing the range of element indices that belong to each chunk.

@param input Input array
@param numTasks The number of tasks to create
@return The sum of the reciprocals of the array input
Extend the work you did to implement parArraySum to use a set number of tasks to compute the reciprocal array sum . You may find the above utilities getChunkStartInclusive and getChunkEndExclusive helpful in computing the range of element indices that belong to each chunk . @param input Input array @param numTasks The number of tasks to create @return The sum of the reciprocals of the array input
protected static double parManyTaskArraySum(final double[] input,
                                                final int numTasks) {
        ReciprocalArraySumTask task = new ReciprocalArraySumTask(0, input.length, input, numTasks);
        ForkJoinPool pool = new ForkJoinPool(numTasks);
        pool.invoke(task);
        return task.value;
    }
protected static double parManyTaskArraySum ( final double [ ] input , final int numTasks ) { ReciprocalArraySumTask task = new ReciprocalArraySumTask ( 0 , input . length , input , numTasks ) ; ForkJoinPool pool = new ForkJoinPool ( numTasks ) ; pool . invoke ( task ) ; return task . value ; }
TODO: Extend the work you did to implement parArraySum to use a set
 number of tasks to compute the reciprocal array sum.
TODO : Extend the work you did to implement parArraySum to use a set number of tasks to compute the reciprocal array sum .