How can I mix the Concurrency Runtime with .NET code?

前端 未结 5 1336
旧时难觅i
旧时难觅i 2021-01-06 04:14

I\'ve been using the Concurrency Runtime in a C++ static library, and recently wanted to use this library in a C++/CLI project, to take advantage of the Windows Form designe

5条回答
  •  感情败类
    2021-01-06 04:40

    I'm not sure how detailed your concurrent needs are, but OpenMP works fine (i.e., you can combine options /clr and /openmp)

    array^ model ....;
    #pragma omp parallel for
    for(int i=0;iLength;i++) {
        model[i] = ComputeModelFor(i);
    }
    

提交回复
热议问题