From 5da05b365f42dee4f6671d110c86fb93c236d866 Mon Sep 17 00:00:00 2001 From: motiz88 Date: Thu, 5 Jun 2014 22:06:09 +0300 Subject: [PATCH] Small fixes for TBB on windows Changed an #ifdef ISPC_IS_WINDOWS in the definition of TaskInfo to #ifdef ISPC_USE_CONCRT, and fixed two calls to taskCount() that were missing parentheses. --- examples/tasksys.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/tasksys.cpp b/examples/tasksys.cpp index 77269f9f..d7b2a801 100644 --- a/examples/tasksys.cpp +++ b/examples/tasksys.cpp @@ -183,7 +183,7 @@ struct TaskInfo { void *data; int taskIndex; int taskCount3d[3]; -#if defined(ISPC_IS_WINDOWS) +#if defined( ISPC_USE_CONCRT) event taskEvent; #endif int taskCount() const { return taskCount3d[0]*taskCount3d[1]*taskCount3d[2]; } @@ -998,7 +998,7 @@ TaskGroup::Launch(int baseIndex, int count) { // Actually run the task. // TBB does not expose the task -> thread mapping so we pretend it's 1:1 int threadIndex = ti->taskIndex; - int threadCount = ti->taskCount; + int threadCount = ti->taskCount(); ti->func(ti->data, threadIndex, threadCount, ti->taskIndex, ti->taskCount(), ti->taskIndex0(), ti->taskIndex1(), ti->taskIndex2(), @@ -1028,7 +1028,7 @@ TaskGroup::Launch(int baseIndex, int count) { // TBB does not expose the task -> thread mapping so we pretend it's 1:1 int threadIndex = ti->taskIndex; - int threadCount = ti->taskCount; + int threadCount = ti->taskCount(); ti->func(ti->data, threadIndex, threadCount, ti->taskIndex, ti->taskCount(), ti->taskIndex0(), ti->taskIndex1(), ti->taskIndex2(), ti->taskCount0(), ti->taskCount1(), ti->taskCount2());