Jump to content
Steve Maughan

TParallelArray Documentation?

Recommended Posts

Does anyone know how to access the new TParallelArray capabilities? I can't find any documentation on the website.

 

— Steve

Share this post


Link to post

This is the public interface:

 

  TParallelArrayForProc<T> = reference to procedure (const AValues: array of T; AFrom, ATo: NativeInt);
  TParallelArray = class  public
    class procedure &For<T>(const AValues: array of T; const AProc: TParallelArrayForProc<T>); overload; static;
    class procedure &For<T>(const AValues: array of T; const AProc: TParallelArrayForProc<T>; AIndex, ACount: NativeInt); overload; static;
    class procedure &For<T>(const AValues: array of T; const AProc: TParallelArrayForProc<T>; AIndex, ACount: NativeInt; APool: TThreadPool; AThreshold: NativeInt); overload; static;
    class procedure &For<T>(const AValues: TArray<T>; const AProc: TParallelArrayForProc<T>); overload; static; inline;
    class procedure &For<T>(const AValues: TArray<T>; const AProc: TParallelArrayForProc<T>; AIndex, ACount: NativeInt); overload; static; inline;
    class procedure &For<T>(const AValues: TArray<T>; const AProc: TParallelArrayForProc<T>; AIndex, ACount: NativeInt; APool: TThreadPool; AThreshold: NativeInt); overload; static; inline;
    class procedure Sort<T>(var AValues: array of T); overload; static;
    class procedure Sort<T>(var AValues: array of T; const AComparer: IComparer<T>); overload; static;
    class procedure Sort<T>(var AValues: array of T; const AComparer: IComparer<T>; AIndex, ACount: NativeInt; APool: TThreadPool); overload; static;
    class procedure Sort<T>(var AValues: TArray<T>); overload; static; inline;
    class procedure Sort<T>(var AValues: TArray<T>; const AComparer: IComparer<T>); overload; static; inline;
    class procedure Sort<T>(var AValues: TArray<T>; const AComparer: IComparer<T>; AIndex, ACount: NativeInt; APool: TThreadPool); overload; static; inline;
    class property ForThreshold: NativeInt read FForThreshold write FForThreshold default 50000;
    class property SortThreshold: NativeInt read FSortThreshold write FSortThreshold default 5000;
  end;

 

Edited by pyscripter
  • Like 1

Share this post


Link to post

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

×