search for: omp_set_lock

Displaying 4 results from an estimated 4 matches for "omp_set_lock".

2015 Apr 10
4
[LLVMdev] Optimization on Atomics (and the OpenMP memory model)
...cture in some compilers. * What are non-seq_cst atomic read, write, update and capture lowered to for each of your targets? * What are seq_cst atomic read, write, update and capture lowered to for each of your targets? * What is the taskwait construct lowered to for each of your targets? * What are omp_set_lock and omp_unset_lock lowered to for each of your targets? * What is a barrier lowered to for each of your targets? * Are any optimisations allowed to reorder, change or remove code that uses any of the synchronisation constructs above, or any of the other synchronisation constructs in section 2.12 of...
2005 Nov 07
3
R thread safe
...SEXP ans, alocal; omp_lock_t lck; PROTECT(ans = allocVector(VECSXP, n)); ans = allocVector(VECSXP, n); omp_init_lock(&lck); #pragma omp parallel for default(none) private(i, alocal) shared(list, lck,rho, ans, n, expr) for(i = 0; i < n; i++) { omp_set_lock(&lck); PROTECT(alocal = allocVector(VECSXP, 1)); alocal = allocVector(VECSXP, 1); defineVar(install("x"), VECTOR_ELT(list, i), rho); omp_unset_lock(&lck); /* do computational kernel in parallel */ alocal = eval(...
2005 Nov 07
4
Time-measurement in milliseconds
Hi there I'm loking for a time-measurement to measure time-differences in milliseconds. On my search, I only found the following: - package "base": Sys.time() -> only second-accuracy - package "R.utils": System$currentTimeMillis() -> returns integer of milliseconds, but accuracy is only whole seconds too. At the moment I run every bit of code to measure
2015 Aug 21
2
OpenMP problem with 64-bit Rtools
...; void show_pad(void) { int i; for (i = 0; i<20; i++) printf(" %02x",s.pad[i]); printf("\n"); } int main(void) { int i; printf("size: %d\n",(int)sizeof s); for (i = 0; i<20; i++) s.pad[i] = 7; show_pad(); omp_init_lock (&s.lock); show_pad(); omp_set_lock (&s.lock); show_pad(); return 0; } When compiled using the Rtools compiler with "gcc -m32 -fopenmp", it works fine, printing three lines of output with all numbers being 7. But when compiled with "gcc -m64 -fopenmp", the last two lines have four zeros at the beginning....