TBB example source code ( parallel_invoke function )

You need TBB lib to run this source code.

Download TBB file, and unzip your propely new folder in your computer.
And copy dll files into windows\system folder.

TBB download url -> https://www.threadingbuildingblocks.org/download

Set path of TBB incoude, lib location on the Visual studio.

This is example source code.

#include < stdio.h>
#include < tchar.h>
#include < time.h>
#include < tbb/tbb.h>

#ifdef _DEBUG
#pragma comment(lib, "tbb_debug.lib")
#pragma comment(lib, "tbb.lib");
#endif // _DEBUG

using namespace tbb;

void main()
 task_scheduler_init init;

  ::printf("finish:%d\n", 1000);
  ::printf("finish:%d\n", 10000);

 printf("All work is done \n");


No comments:

Post a Comment