Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions common_alpha.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@

#define MB asm("mb")
#define WMB asm("wmb")
#define RMB asm("rmb")

static void __inline blas_lock(unsigned long *address){
#ifndef __DECC
Expand Down
2 changes: 2 additions & 0 deletions common_arm.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#define MB
#define WMB
#define RMB

#else

#define MB __asm__ __volatile__ ("dmb ish" : : : "memory")
#define WMB __asm__ __volatile__ ("dmb ishst" : : : "memory")
#define RMB __asm__ __volatile__ ("dmb ish" : : : "memory")

#endif

Expand Down
2 changes: 1 addition & 1 deletion common_arm64.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#define MB __asm__ __volatile__ ("dmb ish" : : : "memory")
#define WMB __asm__ __volatile__ ("dmb ishst" : : : "memory")

#define RMB __asm__ __volatile__ ("dmb ishld" : : : "memory")

#define INLINE inline

Expand Down
1 change: 1 addition & 0 deletions common_ia64.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@

#define MB
#define WMB
#define RMB

#ifdef __ECC
#include <ia64intrin.h>
Expand Down
1 change: 1 addition & 0 deletions common_mips.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#define MB __sync_synchronize()
#define WMB __sync_synchronize()
#define RMB __sync_synchronize()

#define INLINE inline

Expand Down
1 change: 1 addition & 0 deletions common_mips64.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#define MB __sync_synchronize()
#define WMB __sync_synchronize()
#define RMB __sync_synchronize()

#define INLINE inline

Expand Down
2 changes: 2 additions & 0 deletions common_power.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,11 @@
#if defined(POWER8) || defined(POWER9)
#define MB __asm__ __volatile__ ("eieio":::"memory")
#define WMB __asm__ __volatile__ ("eieio":::"memory")
#define RMB __asm__ __volatile__ ("eieio":::"memory")
#else
#define MB __asm__ __volatile__ ("sync")
#define WMB __asm__ __volatile__ ("sync")
#define RMB __asm__ __volatile__ ("sync")
#endif

#define INLINE inline
Expand Down
1 change: 1 addition & 0 deletions common_sparc.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@

#define MB __asm__ __volatile__ ("nop")
#define WMB __asm__ __volatile__ ("nop")
#define RMB __asm__ __volatile__ ("nop")

#ifndef ASSEMBLER

Expand Down
1 change: 1 addition & 0 deletions common_x86.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@

#define MB
#define WMB
#define RMB

#ifdef C_SUN
#define __asm__ __asm
Expand Down
3 changes: 3 additions & 0 deletions common_x86_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,16 @@
#ifdef __GNUC__
#define MB do { __asm__ __volatile__("": : :"memory"); } while (0)
#define WMB do { __asm__ __volatile__("": : :"memory"); } while (0)
#define RMB
#else
#define MB do {} while (0)
#define WMB do {} while (0)
#define RMB
#endif

static void __inline blas_lock(volatile BLASULONG *address){


#ifndef C_MSVC
int ret;
#else
Expand Down
3 changes: 1 addition & 2 deletions common_zarch.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define COMMON_ZARCH

#define MB
//__asm__ __volatile__ ("dmb ish" : : : "memory")
#define WMB
//__asm__ __volatile__ ("dmb ishst" : : : "memory")
#define RMB


#define INLINE inline
Expand Down
1 change: 1 addition & 0 deletions driver/others/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -2741,6 +2741,7 @@ void *blas_memory_alloc(int procpos){
LOCK_COMMAND(&alloc_lock);
#endif
do {
RMB;
#if defined(USE_OPENMP)
if (!memory[position].used) {
blas_lock(&memory[position].lock);
Expand Down