I know this might have been asked in the past but I am an absolute beginner in Julia.
I have a simple code in Julia that I would like to run in parallel.
#--Two Calculations during the Loop--
vt_0=0
ct_0=0
for i=1:10
#--Calculation vt_1
vt_1=max(rand(1:i),vt_0,ct_0)
#--Calculation ct_1
ct_1=min(rand(1:i),vt_0,ct_0)
ct_0=ct_1
vt_0=vt_1
end
So as you can see, the calculation of vt_1
and ct_1
could be done at the same time (or during the same loop without having the ct_1
calculation waiting for the vt_1
calculation).
Can anybody help me modify this code to run in parallel? Should I download any Julia script/library? (I have a much bigger and complicated code for dynamic programing but the essence is the same.)
Thank you in advance