function high_card_parfor_test ( )

%*****************************************************************************80
%
%% high_card_parfor_test() uses parpool() to run the high_card() code in parallel.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    17 December 2023
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../high_card_parfor' );

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'high_card_parfor_test():\n' );
  fprintf ( 1, '  high_card_parfor() simulates the high card problem.\n' );
  fprintf ( 1, '  The parfor() function is used for parallel execution.\n' );
  fprintf ( 1, '\n' );

  w = 4;
  m = 100;
  n = 1000;
  pool = parpool ( w );

  p = high_card_parfor ( m, n );

  delete ( pool );

  high_card_display ( m, p );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'high_card_parfor_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  timestamp ( );

  rmpath ( '../high_card_parfor' );

  return
end
function timestamp ( )

%*****************************************************************************80
%
%% timestamp() prints the YhelloHMS date as a timestamp.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 November 2022
%
%  Author:
%
%    John Burkardt
%
  t = now ( );
  c = datevec ( t );
  s = datestr ( c, 0 );
  fprintf ( 1, '%s\n', s );

  return
end

