~pragmatic-core/pragmatic/scaling_optimisation

« back to all changes in this revision

Viewing changes to configure

  • Committer: George Rokos
  • Date: 2013-11-15 15:13:40 UTC
  • mfrom: (599.1.10 scaling_optimisation)
  • Revision ID: gr409@doc.ic.ac.uk-20131115151340-un71jil3ujr4spht
Merged with george_scaling

Show diffs side-by-side

added added

removed removed

Lines of Context:
22609
22609
#ifndef PRAGMATIC_CONFIG_H
22610
22610
#define PRAGMATIC_CONFIG_H
22611
22611
 
22612
 
#if __FUJITSU
22613
 
#define pragmatic_omp_atomic_capture(SHARED,INC,OLD) \
22614
 
asm volatile(\
22615
 
"retry:;"\
22616
 
"ld %1, %%l0;"\
22617
 
"add %%l0, %2, %%l1;"\
22618
 
"cas %1, %%l0, %%l1;"\
22619
 
"cmp %%l0, %%l1;"\
22620
 
"bne retry;"\
22621
 
"mov %%l1, %0;"\
22622
 
:"=r"((OLD))\
22623
 
:"r"(&(SHARED)), "r"((INC))\
22624
 
:"l0", "l1"\
22625
 
);
22626
 
#elif _OPENMP >= 201107
22627
 
#define pragmatic_omp_atomic_capture(SHARED,INC,OLD) _Pragma("omp atomic capture") /*
22628
 
*/ {(OLD)=(SHARED); (SHARED)+=(INC);}
22629
 
#else
22630
 
#define pragmatic_omp_atomic_capture(SHARED,INC,OLD) \
22631
 
OLD = __sync_fetch_and_add(&(SHARED), (INC));
22632
 
#endif
22633
 
 
22634
 
#if FCC
22635
 
#define pragmatic_omp_atomic_read() _Pragma("omp critical")
22636
 
#define pragmatic_omp_atomic_write() _Pragma("omp critical")
22637
 
#else
22638
 
#define pragmatic_omp_atomic_read() _Pragma("omp atomic read")
22639
 
#define pragmatic_omp_atomic_write() _Pragma("omp atomic write")
22640
 
#endif
22641
 
 
22642
22612
EOF
22643
22613
 
22644
22614
cat confdefs.h | grep "^#[dua][enl][fdl][ieo][nfw]" >> include/pragmatic_config.h