#define RPCC64BIT
#endif // !RPCC_DEFINED
+#if !defined(BLAS_LOCK_DEFINED) && defined(__GNUC__)
+static void __inline blas_lock(volatile BLASULONG *address){
+
+ do {
+ while (*address) {YIELDING;};
+
+ } while (!__sync_bool_compare_and_swap(address, 0, 1));
+}
+#define BLAS_LOCK_DEFINED
+#endif
+
#ifndef RPCC_DEFINED
#error "rpcc() implementation is missing for your platform"
#endif
+#ifndef BLAS_LOCK_DEFINED
+#error "blas_lock() implementation is missing for your platform"
+#endif
#endif // !ASSEMBLER
#ifdef OS_LINUX
"30:", address);
#endif
}
+#define BLAS_LOCK_DEFINED
static __inline unsigned int rpcc(void){
#ifndef ASSEMBLER
+#if defined(ARMV6) || defined(ARMV7) || defined(ARMV8)
+
static void __inline blas_lock(volatile BLASULONG *address){
int register ret;
MB;
}
+#define BLAS_LOCK_DEFINED
+#endif
static inline int blas_quickdivide(blasint x, blasint y){
return x / y;
} while (ret);
}
+#define BLAS_LOCK_DEFINED
static inline int blas_quickdivide(blasint x, blasint y){
: "ar.ccv", "memory");
} while (ret);
}
+#define BLAS_LOCK_DEFINED
static __inline unsigned long rpcc(void) {
unsigned long clocks;
while (*address || _InterlockedCompareExchange((volatile int *) address,1,0))
;
}
+#define BLAS_LOCK_DEFINED
static __inline unsigned int rpcc(void) {
return __getReg(_IA64_REG_AR_ITC);
} while (ret);
}
+#define BLAS_LOCK_DEFINED
static inline unsigned int rpcc(void){
unsigned long ret;
#endif
} while (ret);
}
+#define BLAS_LOCK_DEFINED
static inline unsigned long rpcc(void){
unsigned long ret;
: "memory");
} while (ret);
}
+#define BLAS_LOCK_DEFINED
static __inline unsigned long rpcc(void){
unsigned long clocks;
} while (ret);
}
+#define BLAS_LOCK_DEFINED
static __inline unsigned long long rpcc(void){
unsigned int a, d;
} while (ret);
}
+#define BLAS_LOCK_DEFINED
static __inline BLASULONG rpcc(void){
BLASULONG a, d;