Browse Source

experimentally removed expensive function calls

tags/v0.2.12^2
wernsaar 11 years ago
parent
commit
2021d0f9d6
2 changed files with 11 additions and 0 deletions
  1. +9
    -0
      common_x86_64.h
  2. +2
    -0
      driver/others/parameter.c

+ 9
- 0
common_x86_64.h View File

@@ -46,6 +46,7 @@
#define __volatile__
#endif

/*
#ifdef HAVE_SSE2
#define MB __asm__ __volatile__ ("mfence");
#define WMB __asm__ __volatile__ ("sfence");
@@ -53,6 +54,10 @@
#define MB
#define WMB
#endif
*/

#define MB
#define WMB

static void __inline blas_lock(volatile BLASULONG *address){

@@ -99,6 +104,8 @@ static __inline void cpuid(int op, int *eax, int *ebx, int *ecx, int *edx){
: "0" (op));
}

/*

#define WHEREAMI

static inline int WhereAmI(void){
@@ -111,6 +118,8 @@ static inline int WhereAmI(void){
return apicid;
}

*/

#ifdef CORE_BARCELONA
#define IFLUSH gotoblas_iflush()
#define IFLUSH_HALF gotoblas_iflush_half()


+ 2
- 0
driver/others/parameter.c View File

@@ -251,7 +251,9 @@ void blas_set_parameter(void){

env_var_t p;
int factor;
#if !defined(BULLDOZER)
int size = get_L2_size();
#endif

#if defined(CORE_KATMAI) || defined(CORE_COPPERMINE) || defined(CORE_BANIAS)
size >>= 7;


Loading…
Cancel
Save