Jump to content
  • 0
Sign in to follow this  
AFDesign

Multi-core support on Vectorscript

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);

Share this post


Link to post

1 answer to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×