Browse Source

Use -DUSE_MAX macro instead of -UUSE_MIN.

pull/2425/head
Martin Liska 6 years ago
parent
commit
e94140bdc2
No known key found for this signature in database GPG Key ID: 4DC182DC0FA73785
45 changed files with 253 additions and 123 deletions
  1. +6
    -6
      interface/CMakeLists.txt
  2. +26
    -26
      interface/Makefile
  3. +5
    -3
      interface/imax.c
  4. +4
    -4
      interface/max.c
  5. +6
    -6
      kernel/CMakeLists.txt
  6. +18
    -18
      kernel/Makefile.L1
  7. +4
    -2
      kernel/alpha/amax.S
  8. +4
    -2
      kernel/alpha/iamax.S
  9. +4
    -2
      kernel/alpha/imax.S
  10. +4
    -2
      kernel/alpha/izamax.S
  11. +4
    -2
      kernel/alpha/max.S
  12. +4
    -2
      kernel/alpha/zamax.S
  13. +4
    -2
      kernel/ia64/izamax.S
  14. +4
    -2
      kernel/sparc/amax.S
  15. +4
    -2
      kernel/sparc/iamax.S
  16. +4
    -2
      kernel/sparc/imax.S
  17. +4
    -2
      kernel/sparc/izamax.S
  18. +4
    -2
      kernel/sparc/max.S
  19. +4
    -2
      kernel/sparc/zamax.S
  20. +4
    -2
      kernel/x86/amax.S
  21. +6
    -1
      kernel/x86/amax_sse.S
  22. +6
    -1
      kernel/x86/amax_sse2.S
  23. +4
    -2
      kernel/x86/iamax.S
  24. +6
    -1
      kernel/x86/iamax_sse.S
  25. +6
    -1
      kernel/x86/iamax_sse2.S
  26. +4
    -2
      kernel/x86/izamax.S
  27. +6
    -1
      kernel/x86/izamax_sse.S
  28. +6
    -1
      kernel/x86/izamax_sse2.S
  29. +4
    -2
      kernel/x86/zamax.S
  30. +6
    -1
      kernel/x86/zamax_sse.S
  31. +6
    -1
      kernel/x86/zamax_sse2.S
  32. +4
    -2
      kernel/x86_64/amax.S
  33. +5
    -1
      kernel/x86_64/amax_atom.S
  34. +6
    -1
      kernel/x86_64/amax_sse.S
  35. +6
    -1
      kernel/x86_64/amax_sse2.S
  36. +4
    -2
      kernel/x86_64/iamax.S
  37. +4
    -1
      kernel/x86_64/iamax_sse.S
  38. +6
    -1
      kernel/x86_64/iamax_sse2.S
  39. +4
    -2
      kernel/x86_64/izamax.S
  40. +6
    -1
      kernel/x86_64/izamax_sse.S
  41. +6
    -1
      kernel/x86_64/izamax_sse2.S
  42. +4
    -2
      kernel/x86_64/zamax.S
  43. +5
    -1
      kernel/x86_64/zamax_atom.S
  44. +6
    -1
      kernel/x86_64/zamax_sse.S
  45. +6
    -1
      kernel/x86_64/zamax_sse2.S

+ 6
- 6
interface/CMakeLists.txt View File

@@ -90,13 +90,13 @@ foreach (CBLAS_FLAG ${CBLAS_FLAGS})
GenerateNamedObjects("trsm.c" "TRMM" "trmm" ${CBLAS_FLAG})

# max and imax are compiled 4 times
GenerateNamedObjects("max.c" "" "" ${CBLAS_FLAG})
GenerateNamedObjects("max.c" "USE_ABS" "amax" ${CBLAS_FLAG})
GenerateNamedObjects("max.c" "USE_MAX" "" ${CBLAS_FLAG})
GenerateNamedObjects("max.c" "USE_ABS;USE_MAX" "amax" ${CBLAS_FLAG})
GenerateNamedObjects("max.c" "USE_ABS;USE_MIN" "amin" ${CBLAS_FLAG})
GenerateNamedObjects("max.c" "USE_MIN" "min" ${CBLAS_FLAG})

GenerateNamedObjects("imax.c" "" "i*max" ${CBLAS_FLAG})
GenerateNamedObjects("imax.c" "USE_ABS" "i*amax" ${CBLAS_FLAG})
GenerateNamedObjects("imax.c" "USE_MAX" "i*max" ${CBLAS_FLAG})
GenerateNamedObjects("imax.c" "USE_ABS;USE_MAX" "i*amax" ${CBLAS_FLAG})
GenerateNamedObjects("imax.c" "USE_ABS;USE_MIN" "i*amin" ${CBLAS_FLAG})
GenerateNamedObjects("imax.c" "USE_MIN" "i*min" ${CBLAS_FLAG})

@@ -123,7 +123,7 @@ foreach (float_type ${FLOAT_TYPES})
GenerateNamedObjects("nrm2.c" "" "scnrm2" ${CBLAS_FLAG} "" "" true "COMPLEX")
GenerateNamedObjects("zrot.c" "" "csrot" ${CBLAS_FLAG} "" "" true "COMPLEX")
GenerateNamedObjects("max.c" "USE_ABS;USE_MIN" "scamin" ${CBLAS_FLAG} "" "" true "COMPLEX")
GenerateNamedObjects("max.c" "USE_ABS" "scamax" ${CBLAS_FLAG} "" "" true "COMPLEX")
GenerateNamedObjects("max.c" "USE_ABS;USE_MAX" "scamax" ${CBLAS_FLAG} "" "" true "COMPLEX")
GenerateNamedObjects("asum.c" "" "scasum" ${CBLAS_FLAG} "" "" true "COMPLEX")
GenerateNamedObjects("sum.c" "" "scsum" ${CBLAS_FLAG} "" "" true "COMPLEX")
endif ()
@@ -132,7 +132,7 @@ foreach (float_type ${FLOAT_TYPES})
GenerateNamedObjects("nrm2.c" "" "dznrm2" ${CBLAS_FLAG} "" "" true "ZCOMPLEX")
GenerateNamedObjects("zrot.c" "" "zdrot" ${CBLAS_FLAG} "" "" true "ZCOMPLEX")
GenerateNamedObjects("max.c" "USE_ABS;USE_MIN" "dzamin" ${CBLAS_FLAG} "" "" true "ZCOMPLEX")
GenerateNamedObjects("max.c" "USE_ABS" "dzamax" ${CBLAS_FLAG} "" "" true "ZCOMPLEX")
GenerateNamedObjects("max.c" "USE_ABS;USE_MAX" "dzamax" ${CBLAS_FLAG} "" "" true "ZCOMPLEX")
GenerateNamedObjects("asum.c" "" "dzasum" ${CBLAS_FLAG} "" "" true "ZCOMPLEX")
GenerateNamedObjects("sum.c" "" "dzsum" ${CBLAS_FLAG} "" "" true "ZCOMPLEX")
endif ()


+ 26
- 26
interface/Makefile View File

@@ -603,22 +603,22 @@ qxnrm2.$(SUFFIX) qxnrm2.$(PSUFFIX) : nrm2.c
$(CC) $(CFLAGS) -c $< -o $(@F)

samax.$(SUFFIX) samax.$(PSUFFIX) : max.c
$(CC) $(CFLAGS) -c -DUSE_ABS -UUSE_MIN $< -o $(@F)
$(CC) $(CFLAGS) -c -DUSE_ABS -DUSE_MAX $< -o $(@F)

damax.$(SUFFIX) damax.$(PSUFFIX) : max.c
$(CC) $(CFLAGS) -c -DUSE_ABS -UUSE_MIN $< -o $(@F)
$(CC) $(CFLAGS) -c -DUSE_ABS -DUSE_MAX $< -o $(@F)

qamax.$(SUFFIX) qamax.$(PSUFFIX) : max.c
$(CC) $(CFLAGS) -c -DUSE_ABS -UUSE_MIN $< -o $(@F)
$(CC) $(CFLAGS) -c -DUSE_ABS -DUSE_MAX $< -o $(@F)

scamax.$(SUFFIX) scamax.$(PSUFFIX) : max.c
$(CC) $(CFLAGS) -c -DUSE_ABS -UUSE_MIN $< -o $(@F)
$(CC) $(CFLAGS) -c -DUSE_ABS -DUSE_MAX $< -o $(@F)

dzamax.$(SUFFIX) dzamax.$(PSUFFIX) : max.c
$(CC) $(CFLAGS) -c -DUSE_ABS -UUSE_MIN $< -o $(@F)
$(CC) $(CFLAGS) -c -DUSE_ABS -DUSE_MAX $< -o $(@F)

qxamax.$(SUFFIX) qxamax.$(PSUFFIX) : max.c
$(CC) $(CFLAGS) -c -DUSE_ABS -UUSE_MIN $< -o $(@F)
$(CC) $(CFLAGS) -c -DUSE_ABS -DUSE_MAX $< -o $(@F)

samin.$(SUFFIX) samin.$(PSUFFIX) : max.c
$(CC) $(CFLAGS) -c -DUSE_ABS -DUSE_MIN $< -o $(@F)
@@ -639,13 +639,13 @@ qxamin.$(SUFFIX) qxamin.$(PSUFFIX) : max.c
$(CC) $(CFLAGS) -c -DUSE_ABS -DUSE_MIN $< -o $(@F)

smax.$(SUFFIX) smax.$(PSUFFIX) : max.c
$(CC) $(CFLAGS) -c -UUSE_ABS -UUSE_MIN $< -o $(@F)
$(CC) $(CFLAGS) -c -UUSE_ABS -DUSE_MAX $< -o $(@F)

dmax.$(SUFFIX) dmax.$(PSUFFIX) : max.c
$(CC) $(CFLAGS) -c -UUSE_ABS -UUSE_MIN $< -o $(@F)
$(CC) $(CFLAGS) -c -UUSE_ABS -DUSE_MAX $< -o $(@F)

qmax.$(SUFFIX) qmax.$(PSUFFIX) : max.c
$(CC) $(CFLAGS) -c -UUSE_ABS -UUSE_MIN $< -o $(@F)
$(CC) $(CFLAGS) -c -UUSE_ABS -DUSE_MAX $< -o $(@F)

smin.$(SUFFIX) smin.$(PSUFFIX) : max.c
$(CC) $(CFLAGS) -c -UUSE_ABS -DUSE_MIN $< -o $(@F)
@@ -657,22 +657,22 @@ qmin.$(SUFFIX) qmin.$(PSUFFIX) : max.c
$(CC) $(CFLAGS) -c -UUSE_ABS -DUSE_MIN $< -o $(@F)

isamax.$(SUFFIX) isamax.$(PSUFFIX) : imax.c
$(CC) $(CFLAGS) -c -DUSE_ABS -UUSE_MIN $< -o $(@F)
$(CC) $(CFLAGS) -c -DUSE_ABS -DUSE_MAX $< -o $(@F)

idamax.$(SUFFIX) idamax.$(PSUFFIX) : imax.c
$(CC) $(CFLAGS) -c -DUSE_ABS -UUSE_MIN $< -o $(@F)
$(CC) $(CFLAGS) -c -DUSE_ABS -DUSE_MAX $< -o $(@F)

iqamax.$(SUFFIX) iqamax.$(PSUFFIX) : imax.c
$(CC) $(CFLAGS) -c -DUSE_ABS -UUSE_MIN $< -o $(@F)
$(CC) $(CFLAGS) -c -DUSE_ABS -DUSE_MAX $< -o $(@F)

icamax.$(SUFFIX) icamax.$(PSUFFIX) : imax.c
$(CC) $(CFLAGS) -c -DUSE_ABS -UUSE_MIN $< -o $(@F)
$(CC) $(CFLAGS) -c -DUSE_ABS -DUSE_MAX $< -o $(@F)

izamax.$(SUFFIX) izamax.$(PSUFFIX) : imax.c
$(CC) $(CFLAGS) -c -DUSE_ABS -UUSE_MIN $< -o $(@F)
$(CC) $(CFLAGS) -c -DUSE_ABS -DUSE_MAX $< -o $(@F)

ixamax.$(SUFFIX) ixamax.$(PSUFFIX) : imax.c
$(CC) $(CFLAGS) -c -DUSE_ABS -UUSE_MIN $< -o $(@F)
$(CC) $(CFLAGS) -c -DUSE_ABS -DUSE_MAX $< -o $(@F)

isamin.$(SUFFIX) isamin.$(PSUFFIX) : imax.c
$(CC) $(CFLAGS) -c -DUSE_ABS -DUSE_MIN $< -o $(@F)
@@ -693,13 +693,13 @@ ixamin.$(SUFFIX) ixamin.$(PSUFFIX) : imax.c
$(CC) $(CFLAGS) -c -DUSE_ABS -DUSE_MIN $< -o $(@F)

ismax.$(SUFFIX) ismax.$(PSUFFIX) : imax.c
$(CC) $(CFLAGS) -c -UUSE_ABS -UUSE_MIN $< -o $(@F)
$(CC) $(CFLAGS) -c -UUSE_ABS -DUSE_MAX $< -o $(@F)

idmax.$(SUFFIX) idmax.$(PSUFFIX) : imax.c
$(CC) $(CFLAGS) -c -UUSE_ABS -UUSE_MIN $< -o $(@F)
$(CC) $(CFLAGS) -c -UUSE_ABS -DUSE_MAX $< -o $(@F)

iqmax.$(SUFFIX) iqmax.$(PSUFFIX) : imax.c
$(CC) $(CFLAGS) -c -UUSE_ABS -UUSE_MIN $< -o $(@F)
$(CC) $(CFLAGS) -c -UUSE_ABS -DUSE_MAX $< -o $(@F)

ismin.$(SUFFIX) ismin.$(PSUFFIX) : imax.c
$(CC) $(CFLAGS) -c -UUSE_ABS -DUSE_MIN $< -o $(@F)
@@ -1372,16 +1372,16 @@ xhemm3m.$(SUFFIX) xhemm3m.$(PSUFFIX) : symm.c
$(CC) -c $(CFLAGS) -DGEMM3M -DHEMM $< -o $(@F)

cblas_isamax.$(SUFFIX) cblas_isamax.$(PSUFFIX) : imax.c
$(CC) $(CFLAGS) -DCBLAS -c -DUSE_ABS -UUSE_MIN $< -o $(@F)
$(CC) $(CFLAGS) -DCBLAS -c -DUSE_ABS -DUSE_MAX $< -o $(@F)

cblas_idamax.$(SUFFIX) cblas_idamax.$(PSUFFIX) : imax.c
$(CC) $(CFLAGS) -DCBLAS -c -DUSE_ABS -UUSE_MIN $< -o $(@F)
$(CC) $(CFLAGS) -DCBLAS -c -DUSE_ABS -DUSE_MAX $< -o $(@F)

cblas_icamax.$(SUFFIX) cblas_icamax.$(PSUFFIX) : imax.c
$(CC) $(CFLAGS) -DCBLAS -c -DUSE_ABS -UUSE_MIN $< -o $(@F)
$(CC) $(CFLAGS) -DCBLAS -c -DUSE_ABS -DUSE_MAX $< -o $(@F)

cblas_izamax.$(SUFFIX) cblas_izamax.$(PSUFFIX) : imax.c
$(CC) $(CFLAGS) -DCBLAS -c -DUSE_ABS -UUSE_MIN $< -o $(@F)
$(CC) $(CFLAGS) -DCBLAS -c -DUSE_ABS -DUSE_MAX $< -o $(@F)

cblas_isamin.$(SUFFIX) cblas_isamin.$(PSUFFIX) : imax.c
$(CC) $(CFLAGS) -DCBLAS -c -DUSE_ABS -DUSE_MIN $< -o $(@F)
@@ -1396,10 +1396,10 @@ cblas_izamin.$(SUFFIX) cblas_izamin.$(PSUFFIX) : imax.c
$(CC) $(CFLAGS) -DCBLAS -c -DUSE_ABS -DUSE_MIN $< -o $(@F)

cblas_ismax.$(SUFFIX) cblas_ismax.$(PSUFFIX) : imax.c
$(CC) $(CFLAGS) -DCBLAS -c -UUSE_ABS -UUSE_MIN $< -o $(@F)
$(CC) $(CFLAGS) -DCBLAS -c -UUSE_ABS -DUSE_MAX $< -o $(@F)

cblas_idmax.$(SUFFIX) cblas_idmax.$(PSUFFIX) : imax.c
$(CC) $(CFLAGS) -DCBLAS -c -UUSE_ABS -UUSE_MIN $< -o $(@F)
$(CC) $(CFLAGS) -DCBLAS -c -UUSE_ABS -DUSE_MAX $< -o $(@F)

cblas_ismin.$(SUFFIX) cblas_ismin.$(PSUFFIX) : imax.c
$(CC) $(CFLAGS) -DCBLAS -c -UUSE_ABS -DUSE_MIN $< -o $(@F)
@@ -1408,10 +1408,10 @@ cblas_idmin.$(SUFFIX) cblas_idmin.$(PSUFFIX) : imax.c
$(CC) $(CFLAGS) -DCBLAS -c -UUSE_ABS -DUSE_MIN $< -o $(@F)

cblas_icmax.$(SUFFIX) cblas_icmax.$(PSUFFIX) : imax.c
$(CC) $(CFLAGS) -DCBLAS -c -UUSE_ABS -UUSE_MIN $< -o $(@F)
$(CC) $(CFLAGS) -DCBLAS -c -UUSE_ABS -DUSE_MAX $< -o $(@F)

cblas_izmax.$(SUFFIX) cblas_izmax.$(PSUFFIX) : imax.c
$(CC) $(CFLAGS) -DCBLAS -c -UUSE_ABS -UUSE_MIN $< -o $(@F)
$(CC) $(CFLAGS) -DCBLAS -c -UUSE_ABS -DUSE_MAX $< -o $(@F)

cblas_icmin.$(SUFFIX) cblas_icmin.$(PSUFFIX) : imax.c
$(CC) $(CFLAGS) -DCBLAS -c -UUSE_ABS -DUSE_MIN $< -o $(@F)


+ 5
- 3
interface/imax.c View File

@@ -46,7 +46,7 @@

#ifdef USE_ABS

#ifndef USE_MIN
#if defined(USE_MAX)

/* ABS & MAX */
#ifndef COMPLEX
@@ -69,6 +69,7 @@

#else

#if defined(USE_MIN)
/* ABS & MIN */
#ifndef COMPLEX
#ifdef XDOUBLE
@@ -87,12 +88,13 @@
#define MAX_K ICAMIN_K
#endif
#endif
#endif

#endif

#else

#ifndef USE_MIN
#if defined(USE_MAX)

/* MAX */
#ifdef XDOUBLE
@@ -103,7 +105,7 @@
#define MAX_K ISMAX_K
#endif

#else
#elif defined(USE_MIN)

/* MIN */
#ifdef XDOUBLE


+ 4
- 4
interface/max.c View File

@@ -46,7 +46,7 @@

#ifdef USE_ABS

#ifndef USE_MIN
#if defined(USE_MAX)

/* ABS & MAX */
#ifndef COMPLEX
@@ -67,7 +67,7 @@
#endif
#endif

#else
#elif defined(USE_MIN)

/* ABS & MIN */
#ifndef COMPLEX
@@ -92,7 +92,7 @@

#else

#ifndef USE_MIN
#if defined(USE_MAX)

/* MAX */
#ifdef XDOUBLE
@@ -103,7 +103,7 @@
#define MAX_K SMAX_K
#endif

#else
#elif defined (USE_MIN)

/* MIN */
#ifdef XDOUBLE


+ 6
- 6
kernel/CMakeLists.txt View File

@@ -41,21 +41,21 @@ function (build_core TARGET_CORE KDIR TSUFFIX KERNEL_DEFINITIONS)
foreach (float_type ${FLOAT_TYPES})
# a bit of metaprogramming here to pull out the appropriate KERNEL var
string(SUBSTRING ${float_type} 0 1 float_char)
GenerateNamedObjects("${KERNELDIR}/${${float_char}AMAXKERNEL}" "USE_ABS" "amax_k" false "" "" false ${float_type})
GenerateNamedObjects("${KERNELDIR}/${${float_char}AMAXKERNEL}" "USE_ABS;USE_MAX" "amax_k" false "" "" false ${float_type})
GenerateNamedObjects("${KERNELDIR}/${${float_char}AMINKERNEL}" "USE_ABS;USE_MIN" "amin_k" false "" "" false ${float_type})
if (DEFINED ${float_char}MAXKERNEL)
GenerateNamedObjects("${KERNELDIR}/${${float_char}MAXKERNEL}" "" "max_k" false "" "" false ${float_type})
GenerateNamedObjects("${KERNELDIR}/${${float_char}MAXKERNEL}" "USE_MAX" "max_k" false "" "" false ${float_type})
endif ()
if (DEFINED ${float_char}MINKERNEL)
GenerateNamedObjects("${KERNELDIR}/${${float_char}MINKERNEL}" "" "min_k" false "" "" false ${float_type})
GenerateNamedObjects("${KERNELDIR}/${${float_char}MINKERNEL}" "USE_MIN" "min_k" false "" "" false ${float_type})
endif ()
GenerateNamedObjects("${KERNELDIR}/${I${float_char}AMAXKERNEL}" "USE_ABS" "i*amax_k" false "" "" false ${float_type})
GenerateNamedObjects("${KERNELDIR}/${I${float_char}AMAXKERNEL}" "USE_ABS;USE_MAX" "i*amax_k" false "" "" false ${float_type})
GenerateNamedObjects("${KERNELDIR}/${I${float_char}AMINKERNEL}" "USE_ABS;USE_MIN" "i*amin_k" false "" "" false ${float_type})
if (DEFINED I${float_char}MAXKERNEL)
GenerateNamedObjects("${KERNELDIR}/${I${float_char}MAXKERNEL}" "" "i*max_k" false "" "" false ${float_type})
GenerateNamedObjects("${KERNELDIR}/${I${float_char}MAXKERNEL}" "USE_MAX" "i*max_k" false "" "" false ${float_type})
endif ()
if (DEFINED I${float_char}MINKERNEL)
GenerateNamedObjects("${KERNELDIR}/${I${float_char}MINKERNEL}" "" "i*min_k" false "" "" false ${float_type})
GenerateNamedObjects("${KERNELDIR}/${I${float_char}MINKERNEL}" "USE_MIN" "i*min_k" false "" "" false ${float_type})
endif ()
GenerateNamedObjects("${KERNELDIR}/${${float_char}ASUMKERNEL}" "" "asum_k" false "" "" false ${float_type})
GenerateNamedObjects("${KERNELDIR}/${${float_char}AXPYKERNEL}" "" "axpy_k" false "" "" false ${float_type})


+ 18
- 18
kernel/Makefile.L1 View File

@@ -522,22 +522,22 @@ XBLASOBJS += \


$(KDIR)samax_k$(TSUFFIX).$(SUFFIX) $(KDIR)samax_k$(TPSUFFIX).$(PSUFFIX) : $(KERNELDIR)/$(SAMAXKERNEL)
$(CC) -c $(CFLAGS) -UCOMPLEX -UDOUBLE -DUSE_ABS -UUSE_MIN $< -o $@
$(CC) -c $(CFLAGS) -UCOMPLEX -UDOUBLE -DUSE_ABS -DUSE_MAX $< -o $@

$(KDIR)damax_k$(TSUFFIX).$(SUFFIX) $(KDIR)damax_k$(TPSUFFIX).$(PSUFFIX) : $(KERNELDIR)/$(DAMAXKERNEL)
$(CC) -c $(CFLAGS) -UCOMPLEX -DDOUBLE -DUSE_ABS -UUSE_MIN $< -o $@
$(CC) -c $(CFLAGS) -UCOMPLEX -DDOUBLE -DUSE_ABS -DUSE_MAX $< -o $@

$(KDIR)qamax_k$(TSUFFIX).$(SUFFIX) $(KDIR)qamax_k$(TPSUFFIX).$(PSUFFIX) : $(KERNELDIR)/$(QAMAXKERNEL)
$(CC) -c $(CFLAGS) -UCOMPLEX -DXDOUBLE -DUSE_ABS -UUSE_MIN $< -o $@
$(CC) -c $(CFLAGS) -UCOMPLEX -DXDOUBLE -DUSE_ABS -DUSE_MAX $< -o $@

$(KDIR)camax_k$(TSUFFIX).$(SUFFIX) $(KDIR)camax_k$(TPSUFFIX).$(PSUFFIX) : $(KERNELDIR)/$(CAMAXKERNEL)
$(CC) -c $(CFLAGS) -DCOMPLEX -UDOUBLE -DUSE_ABS -UUSE_MIN $< -o $@
$(CC) -c $(CFLAGS) -DCOMPLEX -UDOUBLE -DUSE_ABS -DUSE_MAX $< -o $@

$(KDIR)zamax_k$(TSUFFIX).$(SUFFIX) $(KDIR)zamax_k$(TPSUFFIX).$(PSUFFIX) : $(KERNELDIR)/$(ZAMAXKERNEL)
$(CC) -c $(CFLAGS) -DCOMPLEX -DDOUBLE -DUSE_ABS -UUSE_MIN $< -o $@
$(CC) -c $(CFLAGS) -DCOMPLEX -DDOUBLE -DUSE_ABS -DUSE_MAX $< -o $@

$(KDIR)xamax_k$(TSUFFIX).$(SUFFIX) $(KDIR)xamax_k$(TPSUFFIX).$(PSUFFIX) : $(KERNELDIR)/$(XAMAXKERNEL)
$(CC) -c $(CFLAGS) -DCOMPLEX -DXDOUBLE -DUSE_ABS -UUSE_MIN $< -o $@
$(CC) -c $(CFLAGS) -DCOMPLEX -DXDOUBLE -DUSE_ABS -DUSE_MAX $< -o $@

### AMIN ###

@@ -562,13 +562,13 @@ $(KDIR)xamin_k$(TSUFFIX).$(SUFFIX) $(KDIR)xamin_k$(TPSUFFIX).$(PSUFFIX) : $(KE
### MAX ###

$(KDIR)smax_k$(TSUFFIX).$(SUFFIX) $(KDIR)smax_k$(TPSUFFIX).$(PSUFFIX) : $(KERNELDIR)/$(SMAXKERNEL)
$(CC) -c $(CFLAGS) -UCOMPLEX -UDOUBLE -UUSE_ABS -UUSE_MIN $< -o $@
$(CC) -c $(CFLAGS) -UCOMPLEX -UDOUBLE -UUSE_ABS -DUSE_MAX $< -o $@

$(KDIR)dmax_k$(TSUFFIX).$(SUFFIX) $(KDIR)dmax_k$(TPSUFFIX).$(PSUFFIX) : $(KERNELDIR)/$(DMAXKERNEL)
$(CC) -c $(CFLAGS) -UCOMPLEX -DDOUBLE -UUSE_ABS -UUSE_MIN $< -o $@
$(CC) -c $(CFLAGS) -UCOMPLEX -DDOUBLE -UUSE_ABS -DUSE_MAX $< -o $@

$(KDIR)qmax_k$(TSUFFIX).$(SUFFIX) $(KDIR)qmax_k$(TPSUFFIX).$(PSUFFIX) : $(KERNELDIR)/$(QMAXKERNEL)
$(CC) -c $(CFLAGS) -UCOMPLEX -DXDOUBLE -UUSE_ABS -UUSE_MIN $< -o $@
$(CC) -c $(CFLAGS) -UCOMPLEX -DXDOUBLE -UUSE_ABS -DUSE_MAX $< -o $@

### MIN ###

@@ -585,22 +585,22 @@ $(KDIR)qmin_k$(TSUFFIX).$(SUFFIX) $(KDIR)qmin_k$(TPSUFFIX).$(PSUFFIX) : $(KERN
### IAMAX ###

$(KDIR)isamax_k$(TSUFFIX).$(SUFFIX) $(KDIR)isamax_k$(TPSUFFIX).$(PSUFFIX) : $(KERNELDIR)/$(ISAMAXKERNEL)
$(CC) -c $(CFLAGS) -UCOMPLEX -UDOUBLE -DUSE_ABS -UUSE_MIN $< -o $@
$(CC) -c $(CFLAGS) -UCOMPLEX -UDOUBLE -DUSE_ABS -DUSE_MAX $< -o $@

$(KDIR)idamax_k$(TSUFFIX).$(SUFFIX) $(KDIR)idamax_k$(TPSUFFIX).$(PSUFFIX) : $(KERNELDIR)/$(IDAMAXKERNEL)
$(CC) -c $(CFLAGS) -UCOMPLEX -DDOUBLE -DUSE_ABS -UUSE_MIN $< -o $@
$(CC) -c $(CFLAGS) -UCOMPLEX -DDOUBLE -DUSE_ABS -DUSE_MAX $< -o $@

$(KDIR)iqamax_k$(TSUFFIX).$(SUFFIX) $(KDIR)iqamax_k$(TPSUFFIX).$(PSUFFIX) : $(KERNELDIR)/$(IQAMAXKERNEL)
$(CC) -c $(CFLAGS) -UCOMPLEX -DXDOUBLE -DUSE_ABS -UUSE_MIN $< -o $@
$(CC) -c $(CFLAGS) -UCOMPLEX -DXDOUBLE -DUSE_ABS -DUSE_MAX $< -o $@

$(KDIR)icamax_k$(TSUFFIX).$(SUFFIX) $(KDIR)icamax_k$(TPSUFFIX).$(PSUFFIX) : $(KERNELDIR)/$(ICAMAXKERNEL)
$(CC) -c $(CFLAGS) -DCOMPLEX -UDOUBLE -DUSE_ABS -UUSE_MIN $< -o $@
$(CC) -c $(CFLAGS) -DCOMPLEX -UDOUBLE -DUSE_ABS -DUSE_MAX $< -o $@

$(KDIR)izamax_k$(TSUFFIX).$(SUFFIX) $(KDIR)izamax_k$(TPSUFFIX).$(PSUFFIX) : $(KERNELDIR)/$(IZAMAXKERNEL)
$(CC) -c $(CFLAGS) -DCOMPLEX -DDOUBLE -DUSE_ABS -UUSE_MIN $< -o $@
$(CC) -c $(CFLAGS) -DCOMPLEX -DDOUBLE -DUSE_ABS -DUSE_MAX $< -o $@

$(KDIR)ixamax_k$(TSUFFIX).$(SUFFIX) $(KDIR)ixamax_k$(TPSUFFIX).$(PSUFFIX) : $(KERNELDIR)/$(IXAMAXKERNEL)
$(CC) -c $(CFLAGS) -DCOMPLEX -DXDOUBLE -DUSE_ABS -UUSE_MIN $< -o $@
$(CC) -c $(CFLAGS) -DCOMPLEX -DXDOUBLE -DUSE_ABS -DUSE_MAX $< -o $@

### IAMIN ###

@@ -625,13 +625,13 @@ $(KDIR)ixamin_k$(TSUFFIX).$(SUFFIX) $(KDIR)ixamin_k$(TPSUFFIX).$(PSUFFIX) : $(
### IMAX ###

$(KDIR)ismax_k$(TSUFFIX).$(SUFFIX) $(KDIR)ismax_k$(TPSUFFIX).$(PSUFFIX) : $(KERNELDIR)/$(ISMAXKERNEL)
$(CC) -c $(CFLAGS) -UCOMPLEX -UDOUBLE -UUSE_ABS -UUSE_MIN $< -o $@
$(CC) -c $(CFLAGS) -UCOMPLEX -UDOUBLE -UUSE_ABS -DUSE_MAX $< -o $@

$(KDIR)idmax_k$(TSUFFIX).$(SUFFIX) $(KDIR)idmax_k$(TPSUFFIX).$(PSUFFIX) : $(KERNELDIR)/$(IDMAXKERNEL)
$(CC) -c $(CFLAGS) -UCOMPLEX -DDOUBLE -UUSE_ABS -UUSE_MIN $< -o $@
$(CC) -c $(CFLAGS) -UCOMPLEX -DDOUBLE -UUSE_ABS -DUSE_MAX $< -o $@

$(KDIR)iqmax_k$(TSUFFIX).$(SUFFIX) $(KDIR)iqmax_k$(TPSUFFIX).$(PSUFFIX) : $(KERNELDIR)/$(IQMAXKERNEL)
$(CC) -c $(CFLAGS) -UCOMPLEX -DXDOUBLE -UUSE_ABS -UUSE_MIN $< -o $@
$(CC) -c $(CFLAGS) -UCOMPLEX -DXDOUBLE -UUSE_ABS -DUSE_MAX $< -o $@

### IMIN ###



+ 4
- 2
kernel/alpha/amax.S View File

@@ -44,10 +44,12 @@
#define X $17
#define INCX $18

#ifndef USE_MIN
#if defined(USE_MAX)
#define CMPLT(a, b) cmptlt a, b
#else
#elif defined(USE_MIN)
#define CMPLT(a, b) cmptlt b, a
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

#define STACKSIZE 6 * 8


+ 4
- 2
kernel/alpha/iamax.S View File

@@ -45,10 +45,12 @@
#define INCX $18
#define XX $19

#ifndef USE_MIN
#if defined(USE_MAX)
#define CMPLT(a, b) cmptlt a, b
#else
#elif defined(USE_MIN)
#define CMPLT(a, b) cmptlt b, a
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

#define STACKSIZE 6 * 8


+ 4
- 2
kernel/alpha/imax.S View File

@@ -45,10 +45,12 @@
#define INCX $18
#define XX $19

#ifndef USE_MIN
#if defined(USE_MAX)
#define CMPLT(a, b) cmptlt a, b
#else
#elif defined(USE_MIN)
#define CMPLT(a, b) cmptlt b, a
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

#define STACKSIZE 8 * 8


+ 4
- 2
kernel/alpha/izamax.S View File

@@ -45,10 +45,12 @@
#define INCX $18
#define XX $19

#ifndef USE_MIN
#if defined(USE_MAX)
#define CMPLT(a, b) cmptlt a, b
#else
#elif defined(USE_MIN)
#define CMPLT(a, b) cmptlt b, a
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

#define STACKSIZE 8 * 8


+ 4
- 2
kernel/alpha/max.S View File

@@ -44,10 +44,12 @@
#define X $17
#define INCX $18

#ifndef USE_MIN
#if defined(USE_MAX)
#define CMPLT(a, b) cmptlt a, b
#else
#elif defined(USE_MIN)
#define CMPLT(a, b) cmptlt b, a
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

#define STACKSIZE 8 * 8


+ 4
- 2
kernel/alpha/zamax.S View File

@@ -44,10 +44,12 @@
#define X $17
#define INCX $18

#ifndef USE_MIN
#if defined(USE_MAX)
#define CMPLT(a, b) cmptlt a, b
#else
#elif defined(USE_MIN)
#define CMPLT(a, b) cmptlt b, a
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

#define STACKSIZE 8 * 8


+ 4
- 2
kernel/ia64/izamax.S View File

@@ -47,12 +47,14 @@
#define PREFETCH_SIZE (32 * 16 + 16)
#endif

#ifdef USE_MIN
#if defined(USE_MIN)
#define CMPUNC cmp.lt.unc
#define CMP cmp.lt
#else
#elif defined(USE_MAX)
#define CMPUNC cmp.gt.unc
#define CMP cmp.gt
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

#define RET r8


+ 4
- 2
kernel/sparc/amax.S View File

@@ -82,10 +82,12 @@
#define a8 %f15
#endif

#ifndef USE_MIN
#if defined(USE_MAX)
#define FCMOV FMOVG
#else
#elif defined(USE_MIN)
#define FCMOV FMOVL
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

PROLOGUE


+ 4
- 2
kernel/sparc/iamax.S View File

@@ -88,12 +88,14 @@
#define a8 %f15
#endif

#ifndef USE_MIN
#if defined(USE_MAX)
#define FCMOV FMOVG
#define CMOV movg
#else
#elif defined(USE_MIN)
#define FCMOV FMOVL
#define CMOV movl
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

PROLOGUE


+ 4
- 2
kernel/sparc/imax.S View File

@@ -88,12 +88,14 @@
#define a8 %f15
#endif

#ifndef USE_MIN
#if defined(USE_MAX)
#define FCMOV FMOVG
#define CMOV movg
#else
#elif defined(USE_MIN)
#define FCMOV FMOVL
#define CMOV movl
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

PROLOGUE


+ 4
- 2
kernel/sparc/izamax.S View File

@@ -96,12 +96,14 @@
#define a8 %f19
#endif

#ifndef USE_MIN
#if defined(USE_MAX)
#define FCMOV FMOVG
#define CMOV movg
#else
#elif defined(USE_MIN)
#define FCMOV FMOVL
#define CMOV movl
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif




+ 4
- 2
kernel/sparc/max.S View File

@@ -82,10 +82,12 @@
#define a8 %f15
#endif

#ifndef USE_MIN
#if defined(USE_MAX)
#define FCMOV FMOVG
#else
#elif defined(USE_MIN)
#define FCMOV FMOVL
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

PROLOGUE


+ 4
- 2
kernel/sparc/zamax.S View File

@@ -90,10 +90,12 @@
#define a8 %f19
#endif

#ifndef USE_MIN
#if defined(USE_MAX)
#define FCMOV FMOVG
#else
#elif defined(USE_MIN)
#define FCMOV FMOVL
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

PROLOGUE


+ 4
- 2
kernel/x86/amax.S View File

@@ -53,10 +53,12 @@
#define X %ecx
#define I %edx

#ifndef USE_MIN
#if defined(USE_MAX)
#define FMOV fcmovbe
#else
#elif defined(USE_MIN)
#define FMOV fcmovnbe
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

#include "l1param.h"


+ 6
- 1
kernel/x86/amax_sse.S View File

@@ -51,9 +51,14 @@
#define INCX %edx
#define I %eax

#ifdef USE_MIN
#if defined(USE_MAX)
#define maxps maxps
#define maxss maxss
#elif defined(USE_MIN)
#define maxps minps
#define maxss minss
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

#include "l1param.h"


+ 6
- 1
kernel/x86/amax_sse2.S View File

@@ -51,9 +51,14 @@
#define INCX %edx
#define I %eax

#ifdef USE_MIN
#if defined(USE_MAX)
#define maxpd maxpd
#define maxsd maxsd
#elif defined(USE_MIN)
#define maxpd minpd
#define maxsd minsd
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

#include "l1param.h"


+ 4
- 2
kernel/x86/iamax.S View File

@@ -53,12 +53,14 @@
#define NUM %edi
#define RET %eax

#ifndef USE_MIN
#if defined(USE_MAX)
#define FMOV fcmovbe
#define IMOV cmovnbe
#else
#elif defined(USE_MIN)
#define FMOV fcmovnbe
#define IMOV cmovb
#else
#error Neither USE_MIN nor USE_MAX is defined
#endif

#include "l1param.h"


+ 6
- 1
kernel/x86/iamax_sse.S View File

@@ -55,9 +55,14 @@
#define XX %edi
#define TEMP %ebx

#ifdef USE_MIN
#if defined(USE_MAX)
#define maxps maxps
#define maxss maxss
#elif defined(USE_MIN)
#define maxps minps
#define maxss minss
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

#ifndef HAVE_SSE2


+ 6
- 1
kernel/x86/iamax_sse2.S View File

@@ -55,9 +55,14 @@
#define XX %edi
#define TEMP %ebx

#ifdef USE_MIN
#if defined(USE_MAX)
#define maxpd maxpd
#define maxsd maxsd
#elif defined(USE_MIN)
#define maxpd minpd
#define maxsd minsd
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

#include "l1param.h"


+ 4
- 2
kernel/x86/izamax.S View File

@@ -55,12 +55,14 @@
#define NUM %edi
#define RET %eax

#ifndef USE_MIN
#if defined(USE_MAX)
#define FMOV fcmovbe
#define IMOV cmovnbe
#else
#elif defined(USE_MIN)
#define FMOV fcmovnb
#define IMOV cmovb
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

#include "l1param.h"


+ 6
- 1
kernel/x86/izamax_sse.S View File

@@ -55,9 +55,14 @@
#define XX %edi
#define TEMP %ebx

#ifdef USE_MIN
#if defined(USE_MAX)
#define maxps maxps
#define maxss maxss
#elif defined(USE_MIN)
#define maxps minps
#define maxss minss
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

#ifndef HAVE_SSE2


+ 6
- 1
kernel/x86/izamax_sse2.S View File

@@ -55,9 +55,14 @@
#define XX %edi
#define TEMP %ebx

#ifdef USE_MIN
#if defined(USE_MAX)
#define maxpd maxpd
#define maxsd maxsd
#elif defined(USE_MIN)
#define maxpd minpd
#define maxsd minsd
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

#include "l1param.h"


+ 4
- 2
kernel/x86/zamax.S View File

@@ -53,10 +53,12 @@
#define X %ecx
#define I %edx

#ifndef USE_MIN
#if defined(USE_MAX)
#define FMOV fcmovbe
#else
#elif defined(USE_MIN)
#define FMOV fcmovnbe
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

#include "l1param.h"


+ 6
- 1
kernel/x86/zamax_sse.S View File

@@ -55,9 +55,14 @@
#define XX %edi
#define TEMP %ebx

#ifdef USE_MIN
#if defined(USE_MAX)
#define maxps maxps
#define maxss maxss
#elif defined(USE_MIN)
#define maxps minps
#define maxss minss
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

#ifndef HAVE_SSE2


+ 6
- 1
kernel/x86/zamax_sse2.S View File

@@ -55,9 +55,14 @@
#define XX %edi
#define TEMP %ebx

#ifdef USE_MIN
#if defined(USE_MAX)
#define maxpd maxpd
#define maxsd maxsd
#elif defined(USE_MIN)
#define maxpd minpd
#define maxsd minsd
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

#include "l1param.h"


+ 4
- 2
kernel/x86_64/amax.S View File

@@ -44,10 +44,12 @@
#define INCX ARG3
#define I %rax

#ifndef USE_MIN
#if defined(USE_MAX)
#define FMOV fcmovbe
#else
#elif defined(USE_MIN)
#define FMOV fcmovnbe
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

#include "l1param.h"


+ 5
- 1
kernel/x86_64/amax_atom.S View File

@@ -45,8 +45,12 @@

#define I %rax

#ifdef USE_MIN
#if defined(USE_MAX)
#define maxsd maxsd
#elif defined(USE_MIN)
#define maxsd minsd
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

#include "l1param.h"


+ 6
- 1
kernel/x86_64/amax_sse.S View File

@@ -45,9 +45,14 @@

#define I %rax

#ifdef USE_MIN
#if defined(USE_MAX)
#define maxps maxps
#define maxss maxss
#elif defined(USE_MIN)
#define maxps minps
#define maxss minss
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

#include "l1param.h"


+ 6
- 1
kernel/x86_64/amax_sse2.S View File

@@ -45,9 +45,14 @@

#define I %rax

#ifdef USE_MIN
#if defined(USE_MAX)
#define maxpd maxpd
#define maxsd maxsd
#elif defined(USE_MIN)
#define maxpd minpd
#define maxsd minsd
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

#include "l1param.h"


+ 4
- 2
kernel/x86_64/iamax.S View File

@@ -47,12 +47,14 @@
#define I ARG4
#define NUM %r10

#ifndef USE_MIN
#if defined(USE_MAX)
#define FMOV fcmovbe
#define IMOV cmovnbe
#else
#elif defined(USE_MIN)
#define FMOV fcmovnbe
#define IMOV cmovb
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

#include "l1param.h"


+ 4
- 1
kernel/x86_64/iamax_sse.S View File

@@ -52,11 +52,14 @@
#define XX %r10
#define MM %r11

#if defined(USE_MAX)
#define MAXPS maxps
#define MAXSS maxss
#ifdef USE_MIN
#elif defined(USE_MIN)
#define MAXPS minps
#define MAXSS minss
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

#include "l1param.h"


+ 6
- 1
kernel/x86_64/iamax_sse2.S View File

@@ -48,9 +48,14 @@
#define XX %r10
#define MM %r11

#ifdef USE_MIN
#if defined(USE_MAX)
#define maxpd maxpd
#define maxsd maxsd
#elif defined(USE_MIN)
#define maxpd minpd
#define maxsd minsd
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

#include "l1param.h"


+ 4
- 2
kernel/x86_64/izamax.S View File

@@ -47,12 +47,14 @@
#define NUM %r10
#define RET %rax

#ifndef USE_MIN
#if defined(USE_MAX)
#define FMOV fcmovbe
#define IMOV cmovnbe
#else
#elif defined(USE_MIN)
#define FMOV fcmovnb
#define IMOV cmovb
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

#include "l1param.h"


+ 6
- 1
kernel/x86_64/izamax_sse.S View File

@@ -48,9 +48,14 @@
#define XX %r10
#define MM %r11

#ifdef USE_MIN
#if defined(USE_MAX)
#define maxps maxps
#define maxss maxss
#elif defined(USE_MIN)
#define maxps minps
#define maxss minss
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

#include "l1param.h"


+ 6
- 1
kernel/x86_64/izamax_sse2.S View File

@@ -48,9 +48,14 @@
#define XX %r10
#define MM %r11

#ifdef USE_MIN
#if defined(USE_MAX)
#define maxpd maxpd
#define maxsd maxsd
#elif defined(USE_MIN)
#define maxpd minpd
#define maxsd minsd
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

#include "l1param.h"


+ 4
- 2
kernel/x86_64/zamax.S View File

@@ -44,10 +44,12 @@
#define INCX ARG3
#define I %rax

#ifndef USE_MIN
#if defined(USE_MAX)
#define FMOV fcmovbe
#else
#elif defined(USE_MIN)
#define FMOV fcmovnbe
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

#include "l1param.h"


+ 5
- 1
kernel/x86_64/zamax_atom.S View File

@@ -45,8 +45,12 @@

#define I %rax

#ifdef USE_MIN
#if defined(USE_MAX)
#define maxsd maxsd
#elif defined(USE_MIN)
#define maxsd minsd
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

#include "l1param.h"


+ 6
- 1
kernel/x86_64/zamax_sse.S View File

@@ -45,9 +45,14 @@

#define I %rax

#ifdef USE_MIN
#if defined(USE_MAX)
#define maxps maxps
#define maxss maxss
#elif defined(USE_MIN)
#define maxps minps
#define maxss minss
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

#include "l1param.h"


+ 6
- 1
kernel/x86_64/zamax_sse2.S View File

@@ -45,9 +45,14 @@

#define I %rax

#ifdef USE_MIN
#if defined(USE_MAX)
#define maxpd maxpd
#define maxsd maxsd
#elif defined(USE_MIN)
#define maxpd minpd
#define maxsd minsd
#else
#error Neither USE_MAX nor USE_MIN is defined
#endif

#include "l1param.h"


Loading…
Cancel
Save