Jump to content
  • 0

Multi-core support on Vectorscript


AFDesign

Question

Hi,

it would be very nice if Vectorscript could take advantage of multi-core cpu in repetition statements, for example:

PROCEDURE multicore;

var
hascanceled:Boolean;
total,counter:integer;	

BEGIN

total:=4000;
counter:=0;
hascanceled:=false;

ProgressDlgOpen('Start multicore test...', true );
ProgressDlgSetMeter('Please wait...' );
ProgressDlgStart(100.0,total);

while (counter < total) do begin

	{...cpu-intensive operations}

	counter:=counter+1;
	progressdlgyield(1);
	hasCanceled := ProgressDlgHasCancel;
	if hasCanceled then counter:=total;

	enablemulticore; {doesn't wait end of operation, start the next with another core}

end; {while}

progressdlgend;
progressdlgclose;

end;

Run(multicore);

Link to comment

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...