mirror of
https://github.com/vtil-project/VTIL-Core
synced 2026-08-17 08:23:03 -04:00
fix bug when disable PARALLEL_TRANSFORM
This commit is contained in:
parent
05b4d14444
commit
4fca1ebca7
2 changed files with 11 additions and 3 deletions
|
|
@ -9,7 +9,11 @@
|
|||
// Determine whether or not to use thread pooling for tasks.
|
||||
//
|
||||
#ifndef VTIL_USE_THREAD_POOLING
|
||||
#define VTIL_USE_THREAD_POOLING true
|
||||
#ifdef _DEBUG
|
||||
#define VTIL_USE_THREAD_POOLING false
|
||||
#else
|
||||
#define VTIL_USE_THREAD_POOLING true
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace vtil::task
|
||||
|
|
|
|||
|
|
@ -36,7 +36,11 @@
|
|||
// Determine whether or not to use parallel transformations.
|
||||
//
|
||||
#ifndef VTIL_USE_PARALLEL_TRANSFORM
|
||||
#define VTIL_USE_PARALLEL_TRANSFORM true
|
||||
#if _DEBUG
|
||||
#define VTIL_USE_PARALLEL_TRANSFORM false
|
||||
#else
|
||||
#define VTIL_USE_PARALLEL_TRANSFORM true
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace vtil
|
||||
|
|
@ -66,7 +70,7 @@ namespace vtil
|
|||
if ( !VTIL_USE_PARALLEL_TRANSFORM || container_size == 1 )
|
||||
{
|
||||
for ( auto it = std::begin( container ); it != std::end( container ); ++it )
|
||||
return worker( *it );
|
||||
worker( *it );
|
||||
}
|
||||
// Otherwise, create task pool and insert for each entry.
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue