Hi,
I do not know much of parallel programming but I try to do something simple (I guess).
My PC has 4 cores
I write in the module :
Imports System.Threading.Tasks
Then
public function dosomething as integer
dim i,j, sum1, sum2 , sum as integer
for i = 1 to 1000
sum1= sum1+ i
next
for j = 1 to 1000
sum2 = sum2 + j
next
sum = sum1 + sum2
return sum
end function
do not see the foolishness of this function because it must emphasize just the parallel programming problem
I want that the two iterations works at the same time
I wrote :
parallel.for(
But the editor proposed just parallel.form1 or parallel.my and parallel.for was not possible.
What am I missing?
Thanks for any response
I do not know much of parallel programming but I try to do something simple (I guess).
My PC has 4 cores
I write in the module :
Imports System.Threading.Tasks
Then
public function dosomething as integer
dim i,j, sum1, sum2 , sum as integer
for i = 1 to 1000
sum1= sum1+ i
next
for j = 1 to 1000
sum2 = sum2 + j
next
sum = sum1 + sum2
return sum
end function
do not see the foolishness of this function because it must emphasize just the parallel programming problem
I want that the two iterations works at the same time
I wrote :
parallel.for(
But the editor proposed just parallel.form1 or parallel.my and parallel.for was not possible.
What am I missing?
Thanks for any response