Hello all,
What is the best way to implement TMR in Rayon?
In TMR the computation is replicated in several threads (three) that work on replicas of the same data. Once they finish, the results are compared to find mismatches.
The equivalence in openMP would be something like:
data0=data;
data1=data;
data2=data;
#pragma omp parallel sections num_threads(MAX_THREADS){
#pragma omp section {
int ithread = omp_get_thread_num();
test(ithread);
}
#pragma omp section {
int ithread = omp_get_thread_num();
test(ithread);
}
#pragma omp section {
int ithread = omp_get_thread_num();
test(ithread);
}
}
test(ithread){
switch(ithread){
case 0: process(data0); break
case 1: process(data1); break
case 2: process(data2); break
}
}
Thanks