You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

param.h 70 kB

12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
7 years ago
12 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
7 years ago
12 years ago
12 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
7 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
7 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
7 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
7 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
7 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
7 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
7 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
7 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
7 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
7 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
7 years ago
12 years ago
12 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
12 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019
  1. /*****************************************************************************
  2. Copyright (c) 2011-2014, The OpenBLAS Project
  3. All rights reserved.
  4. Redistribution and use in source and binary forms, with or without
  5. modification, are permitted provided that the following conditions are
  6. met:
  7. 1. Redistributions of source code must retain the above copyright
  8. notice, this list of conditions and the following disclaimer.
  9. 2. Redistributions in binary form must reproduce the above copyright
  10. notice, this list of conditions and the following disclaimer in
  11. the documentation and/or other materials provided with the
  12. distribution.
  13. 3. Neither the name of the OpenBLAS project nor the names of
  14. its contributors may be used to endorse or promote products
  15. derived from this software without specific prior written
  16. permission.
  17. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  18. AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  19. IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  20. ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  21. LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  22. DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  23. SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  24. CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  25. OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
  26. USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  27. **********************************************************************************/
  28. /*********************************************************************/
  29. /* Copyright 2009, 2010 The University of Texas at Austin. */
  30. /* All rights reserved. */
  31. /* */
  32. /* Redistribution and use in source and binary forms, with or */
  33. /* without modification, are permitted provided that the following */
  34. /* conditions are met: */
  35. /* */
  36. /* 1. Redistributions of source code must retain the above */
  37. /* copyright notice, this list of conditions and the following */
  38. /* disclaimer. */
  39. /* */
  40. /* 2. Redistributions in binary form must reproduce the above */
  41. /* copyright notice, this list of conditions and the following */
  42. /* disclaimer in the documentation and/or other materials */
  43. /* provided with the distribution. */
  44. /* */
  45. /* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */
  46. /* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */
  47. /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
  48. /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */
  49. /* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */
  50. /* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */
  51. /* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */
  52. /* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */
  53. /* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */
  54. /* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */
  55. /* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
  56. /* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */
  57. /* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */
  58. /* POSSIBILITY OF SUCH DAMAGE. */
  59. /* */
  60. /* The views and conclusions contained in the software and */
  61. /* documentation are those of the authors and should not be */
  62. /* interpreted as representing official policies, either expressed */
  63. /* or implied, of The University of Texas at Austin. */
  64. /*********************************************************************/
  65. #ifndef PARAM_H
  66. #define PARAM_H
  67. #ifdef OPTERON
  68. #define SNUMOPT 4
  69. #define DNUMOPT 2
  70. #define GEMM_DEFAULT_OFFSET_A 64
  71. #define GEMM_DEFAULT_OFFSET_B 256
  72. #define GEMM_DEFAULT_ALIGN 0x01ffffUL
  73. #define SGEMM_DEFAULT_UNROLL_N 4
  74. #define DGEMM_DEFAULT_UNROLL_N 4
  75. #define QGEMM_DEFAULT_UNROLL_N 2
  76. #define CGEMM_DEFAULT_UNROLL_N 2
  77. #define ZGEMM_DEFAULT_UNROLL_N 2
  78. #define XGEMM_DEFAULT_UNROLL_N 1
  79. #ifdef ARCH_X86
  80. #define SGEMM_DEFAULT_UNROLL_M 4
  81. #define DGEMM_DEFAULT_UNROLL_M 2
  82. #define QGEMM_DEFAULT_UNROLL_M 2
  83. #define CGEMM_DEFAULT_UNROLL_M 2
  84. #define ZGEMM_DEFAULT_UNROLL_M 1
  85. #define XGEMM_DEFAULT_UNROLL_M 1
  86. #else
  87. #define SGEMM_DEFAULT_UNROLL_M 8
  88. #define DGEMM_DEFAULT_UNROLL_M 4
  89. #define QGEMM_DEFAULT_UNROLL_M 2
  90. #define CGEMM_DEFAULT_UNROLL_M 4
  91. #define ZGEMM_DEFAULT_UNROLL_M 2
  92. #define XGEMM_DEFAULT_UNROLL_M 1
  93. #endif
  94. #define SGEMM_DEFAULT_P sgemm_p
  95. #define DGEMM_DEFAULT_P dgemm_p
  96. #define QGEMM_DEFAULT_P qgemm_p
  97. #define CGEMM_DEFAULT_P cgemm_p
  98. #define ZGEMM_DEFAULT_P zgemm_p
  99. #define XGEMM_DEFAULT_P xgemm_p
  100. #define SGEMM_DEFAULT_R sgemm_r
  101. #define DGEMM_DEFAULT_R dgemm_r
  102. #define QGEMM_DEFAULT_R qgemm_r
  103. #define CGEMM_DEFAULT_R cgemm_r
  104. #define ZGEMM_DEFAULT_R zgemm_r
  105. #define XGEMM_DEFAULT_R xgemm_r
  106. #ifdef ALLOC_HUGETLB
  107. #define SGEMM_DEFAULT_Q 248
  108. #define DGEMM_DEFAULT_Q 248
  109. #define QGEMM_DEFAULT_Q 248
  110. #define CGEMM_DEFAULT_Q 248
  111. #define ZGEMM_DEFAULT_Q 248
  112. #define XGEMM_DEFAULT_Q 248
  113. #else
  114. #define SGEMM_DEFAULT_Q 240
  115. #define DGEMM_DEFAULT_Q 240
  116. #define QGEMM_DEFAULT_Q 240
  117. #define CGEMM_DEFAULT_Q 240
  118. #define ZGEMM_DEFAULT_Q 240
  119. #define XGEMM_DEFAULT_Q 240
  120. #endif
  121. #define SYMV_P 16
  122. #define HAVE_EXCLUSIVE_CACHE
  123. #endif
  124. #if defined(BARCELONA) || defined(SHANGHAI) || defined(BOBCAT)
  125. #define SNUMOPT 8
  126. #define DNUMOPT 4
  127. #define GEMM_DEFAULT_OFFSET_A 64
  128. #define GEMM_DEFAULT_OFFSET_B 832
  129. #define GEMM_DEFAULT_ALIGN 0x0fffUL
  130. #define SGEMM_DEFAULT_UNROLL_N 4
  131. #define DGEMM_DEFAULT_UNROLL_N 4
  132. #define QGEMM_DEFAULT_UNROLL_N 2
  133. #define CGEMM_DEFAULT_UNROLL_N 2
  134. #define ZGEMM_DEFAULT_UNROLL_N 2
  135. #define XGEMM_DEFAULT_UNROLL_N 1
  136. #ifdef ARCH_X86
  137. #define SGEMM_DEFAULT_UNROLL_M 4
  138. #define DGEMM_DEFAULT_UNROLL_M 2
  139. #define QGEMM_DEFAULT_UNROLL_M 2
  140. #define CGEMM_DEFAULT_UNROLL_M 2
  141. #define ZGEMM_DEFAULT_UNROLL_M 1
  142. #define XGEMM_DEFAULT_UNROLL_M 1
  143. #else
  144. #define SGEMM_DEFAULT_UNROLL_M 8
  145. #define DGEMM_DEFAULT_UNROLL_M 4
  146. #define QGEMM_DEFAULT_UNROLL_M 2
  147. #define CGEMM_DEFAULT_UNROLL_M 4
  148. #define ZGEMM_DEFAULT_UNROLL_M 2
  149. #define XGEMM_DEFAULT_UNROLL_M 1
  150. #endif
  151. #if 0
  152. #define SGEMM_DEFAULT_P 496
  153. #define DGEMM_DEFAULT_P 248
  154. #define QGEMM_DEFAULT_P 124
  155. #define CGEMM_DEFAULT_P 248
  156. #define ZGEMM_DEFAULT_P 124
  157. #define XGEMM_DEFAULT_P 62
  158. #define SGEMM_DEFAULT_Q 248
  159. #define DGEMM_DEFAULT_Q 248
  160. #define QGEMM_DEFAULT_Q 248
  161. #define CGEMM_DEFAULT_Q 248
  162. #define ZGEMM_DEFAULT_Q 248
  163. #define XGEMM_DEFAULT_Q 248
  164. #else
  165. #define SGEMM_DEFAULT_P 448
  166. #define DGEMM_DEFAULT_P 224
  167. #define QGEMM_DEFAULT_P 112
  168. #define CGEMM_DEFAULT_P 224
  169. #define ZGEMM_DEFAULT_P 112
  170. #define XGEMM_DEFAULT_P 56
  171. #define SGEMM_DEFAULT_Q 224
  172. #define DGEMM_DEFAULT_Q 224
  173. #define QGEMM_DEFAULT_Q 224
  174. #define CGEMM_DEFAULT_Q 224
  175. #define ZGEMM_DEFAULT_Q 224
  176. #define XGEMM_DEFAULT_Q 224
  177. #endif
  178. #define SGEMM_DEFAULT_R sgemm_r
  179. #define QGEMM_DEFAULT_R qgemm_r
  180. #define DGEMM_DEFAULT_R dgemm_r
  181. #define CGEMM_DEFAULT_R cgemm_r
  182. #define ZGEMM_DEFAULT_R zgemm_r
  183. #define XGEMM_DEFAULT_R xgemm_r
  184. #define SYMV_P 16
  185. #define HAVE_EXCLUSIVE_CACHE
  186. #define GEMM_THREAD gemm_thread_mn
  187. #endif
  188. #ifdef BULLDOZER
  189. #define SNUMOPT 8
  190. #define DNUMOPT 4
  191. #define GEMM_DEFAULT_OFFSET_A 64
  192. #define GEMM_DEFAULT_OFFSET_B 832
  193. #define GEMM_DEFAULT_ALIGN 0x0fffUL
  194. #define QGEMM_DEFAULT_UNROLL_N 2
  195. #define CGEMM_DEFAULT_UNROLL_N 2
  196. #define ZGEMM_DEFAULT_UNROLL_N 2
  197. #define XGEMM_DEFAULT_UNROLL_N 1
  198. #ifdef ARCH_X86
  199. #define SGEMM_DEFAULT_UNROLL_N 4
  200. #define DGEMM_DEFAULT_UNROLL_N 4
  201. #define SGEMM_DEFAULT_UNROLL_M 4
  202. #define DGEMM_DEFAULT_UNROLL_M 2
  203. #define QGEMM_DEFAULT_UNROLL_M 2
  204. #define CGEMM_DEFAULT_UNROLL_M 2
  205. #define ZGEMM_DEFAULT_UNROLL_M 1
  206. #define XGEMM_DEFAULT_UNROLL_M 1
  207. #else
  208. #define SGEMM_DEFAULT_UNROLL_N 2
  209. #define DGEMM_DEFAULT_UNROLL_N 2
  210. #define SGEMM_DEFAULT_UNROLL_M 16
  211. #define DGEMM_DEFAULT_UNROLL_M 8
  212. #define QGEMM_DEFAULT_UNROLL_M 2
  213. #define CGEMM_DEFAULT_UNROLL_M 4
  214. #define ZGEMM_DEFAULT_UNROLL_M 2
  215. #define XGEMM_DEFAULT_UNROLL_M 1
  216. #define CGEMM3M_DEFAULT_UNROLL_N 4
  217. #define CGEMM3M_DEFAULT_UNROLL_M 8
  218. #define ZGEMM3M_DEFAULT_UNROLL_N 4
  219. #define ZGEMM3M_DEFAULT_UNROLL_M 4
  220. #define DGEMM_DEFAULT_UNROLL_MN 16
  221. #define GEMV_UNROLL 8
  222. #endif
  223. #if defined(ARCH_X86_64)
  224. #define SGEMM_DEFAULT_P 768
  225. #define DGEMM_DEFAULT_P 384
  226. #else
  227. #define SGEMM_DEFAULT_P 448
  228. #define DGEMM_DEFAULT_P 224
  229. #endif
  230. #define QGEMM_DEFAULT_P 112
  231. #define CGEMM_DEFAULT_P 224
  232. #define ZGEMM_DEFAULT_P 112
  233. #define XGEMM_DEFAULT_P 56
  234. #if defined(ARCH_X86_64)
  235. #define SGEMM_DEFAULT_Q 168
  236. #define DGEMM_DEFAULT_Q 168
  237. #else
  238. #define SGEMM_DEFAULT_Q 224
  239. #define DGEMM_DEFAULT_Q 224
  240. #endif
  241. #define QGEMM_DEFAULT_Q 224
  242. #define CGEMM_DEFAULT_Q 224
  243. #define ZGEMM_DEFAULT_Q 224
  244. #define XGEMM_DEFAULT_Q 224
  245. #define CGEMM3M_DEFAULT_P 448
  246. #define ZGEMM3M_DEFAULT_P 224
  247. #define XGEMM3M_DEFAULT_P 112
  248. #define CGEMM3M_DEFAULT_Q 224
  249. #define ZGEMM3M_DEFAULT_Q 224
  250. #define XGEMM3M_DEFAULT_Q 224
  251. #define CGEMM3M_DEFAULT_R 12288
  252. #define ZGEMM3M_DEFAULT_R 12288
  253. #define XGEMM3M_DEFAULT_R 12288
  254. #define SGEMM_DEFAULT_R sgemm_r
  255. #define QGEMM_DEFAULT_R qgemm_r
  256. #define DGEMM_DEFAULT_R dgemm_r
  257. #define CGEMM_DEFAULT_R cgemm_r
  258. #define ZGEMM_DEFAULT_R zgemm_r
  259. #define XGEMM_DEFAULT_R xgemm_r
  260. #define SYMV_P 16
  261. #define HAVE_EXCLUSIVE_CACHE
  262. #define GEMM_THREAD gemm_thread_mn
  263. #endif
  264. #ifdef PILEDRIVER
  265. #define SNUMOPT 8
  266. #define DNUMOPT 4
  267. #define GEMM_DEFAULT_OFFSET_A 64
  268. #define GEMM_DEFAULT_OFFSET_B 832
  269. #define GEMM_DEFAULT_ALIGN 0x0fffUL
  270. #define QGEMM_DEFAULT_UNROLL_N 2
  271. #define CGEMM_DEFAULT_UNROLL_N 2
  272. #define ZGEMM_DEFAULT_UNROLL_N 2
  273. #define XGEMM_DEFAULT_UNROLL_N 1
  274. #ifdef ARCH_X86
  275. #define SGEMM_DEFAULT_UNROLL_N 4
  276. #define DGEMM_DEFAULT_UNROLL_N 4
  277. #define SGEMM_DEFAULT_UNROLL_M 4
  278. #define DGEMM_DEFAULT_UNROLL_M 2
  279. #define QGEMM_DEFAULT_UNROLL_M 2
  280. #define CGEMM_DEFAULT_UNROLL_M 2
  281. #define ZGEMM_DEFAULT_UNROLL_M 1
  282. #define XGEMM_DEFAULT_UNROLL_M 1
  283. #else
  284. #define SGEMM_DEFAULT_UNROLL_N 2
  285. #define DGEMM_DEFAULT_UNROLL_N 2
  286. #define SGEMM_DEFAULT_UNROLL_M 16
  287. #define DGEMM_DEFAULT_UNROLL_M 8
  288. #define QGEMM_DEFAULT_UNROLL_M 2
  289. #define CGEMM_DEFAULT_UNROLL_M 4
  290. #define ZGEMM_DEFAULT_UNROLL_M 2
  291. #define XGEMM_DEFAULT_UNROLL_M 1
  292. #define CGEMM3M_DEFAULT_UNROLL_N 4
  293. #define CGEMM3M_DEFAULT_UNROLL_M 8
  294. #define ZGEMM3M_DEFAULT_UNROLL_N 4
  295. #define ZGEMM3M_DEFAULT_UNROLL_M 4
  296. #define GEMV_UNROLL 8
  297. #endif
  298. #if defined(ARCH_X86_64)
  299. #define SGEMM_DEFAULT_P 768
  300. #define DGEMM_DEFAULT_P 768
  301. #define ZGEMM_DEFAULT_P 384
  302. #define CGEMM_DEFAULT_P 768
  303. #else
  304. #define SGEMM_DEFAULT_P 448
  305. #define DGEMM_DEFAULT_P 480
  306. #define ZGEMM_DEFAULT_P 112
  307. #define CGEMM_DEFAULT_P 224
  308. #endif
  309. #define QGEMM_DEFAULT_P 112
  310. #define XGEMM_DEFAULT_P 56
  311. #if defined(ARCH_X86_64)
  312. #define SGEMM_DEFAULT_Q 192
  313. #define DGEMM_DEFAULT_Q 168
  314. #define ZGEMM_DEFAULT_Q 168
  315. #define CGEMM_DEFAULT_Q 168
  316. #else
  317. #define SGEMM_DEFAULT_Q 224
  318. #define DGEMM_DEFAULT_Q 224
  319. #define ZGEMM_DEFAULT_Q 224
  320. #define CGEMM_DEFAULT_Q 224
  321. #endif
  322. #define QGEMM_DEFAULT_Q 224
  323. #define XGEMM_DEFAULT_Q 224
  324. #define CGEMM3M_DEFAULT_P 448
  325. #define ZGEMM3M_DEFAULT_P 224
  326. #define XGEMM3M_DEFAULT_P 112
  327. #define CGEMM3M_DEFAULT_Q 224
  328. #define ZGEMM3M_DEFAULT_Q 224
  329. #define XGEMM3M_DEFAULT_Q 224
  330. #define CGEMM3M_DEFAULT_R 12288
  331. #define ZGEMM3M_DEFAULT_R 12288
  332. #define XGEMM3M_DEFAULT_R 12288
  333. #define SGEMM_DEFAULT_R 12288
  334. #define QGEMM_DEFAULT_R qgemm_r
  335. #define DGEMM_DEFAULT_R 12288
  336. #define CGEMM_DEFAULT_R cgemm_r
  337. #define ZGEMM_DEFAULT_R zgemm_r
  338. #define XGEMM_DEFAULT_R xgemm_r
  339. #define SYMV_P 16
  340. #define HAVE_EXCLUSIVE_CACHE
  341. #define GEMM_THREAD gemm_thread_mn
  342. #endif
  343. #ifdef STEAMROLLER
  344. #define SNUMOPT 8
  345. #define DNUMOPT 4
  346. #define GEMM_DEFAULT_OFFSET_A 64
  347. #define GEMM_DEFAULT_OFFSET_B 832
  348. #define GEMM_DEFAULT_ALIGN 0x0fffUL
  349. #define QGEMM_DEFAULT_UNROLL_N 2
  350. #define CGEMM_DEFAULT_UNROLL_N 2
  351. #define ZGEMM_DEFAULT_UNROLL_N 2
  352. #define XGEMM_DEFAULT_UNROLL_N 1
  353. #ifdef ARCH_X86
  354. #define SGEMM_DEFAULT_UNROLL_N 4
  355. #define DGEMM_DEFAULT_UNROLL_N 4
  356. #define SGEMM_DEFAULT_UNROLL_M 4
  357. #define DGEMM_DEFAULT_UNROLL_M 2
  358. #define QGEMM_DEFAULT_UNROLL_M 2
  359. #define CGEMM_DEFAULT_UNROLL_M 2
  360. #define ZGEMM_DEFAULT_UNROLL_M 1
  361. #define XGEMM_DEFAULT_UNROLL_M 1
  362. #else
  363. #define SGEMM_DEFAULT_UNROLL_N 2
  364. #define DGEMM_DEFAULT_UNROLL_N 2
  365. #define SGEMM_DEFAULT_UNROLL_M 16
  366. #define DGEMM_DEFAULT_UNROLL_M 8
  367. #define QGEMM_DEFAULT_UNROLL_M 2
  368. #define CGEMM_DEFAULT_UNROLL_M 4
  369. #define ZGEMM_DEFAULT_UNROLL_M 2
  370. #define XGEMM_DEFAULT_UNROLL_M 1
  371. #define CGEMM3M_DEFAULT_UNROLL_N 4
  372. #define CGEMM3M_DEFAULT_UNROLL_M 8
  373. #define ZGEMM3M_DEFAULT_UNROLL_N 4
  374. #define ZGEMM3M_DEFAULT_UNROLL_M 4
  375. #define GEMV_UNROLL 8
  376. #endif
  377. #if defined(ARCH_X86_64)
  378. #define SGEMM_DEFAULT_P 768
  379. #define DGEMM_DEFAULT_P 576
  380. #define ZGEMM_DEFAULT_P 288
  381. #define CGEMM_DEFAULT_P 576
  382. #else
  383. #define SGEMM_DEFAULT_P 448
  384. #define DGEMM_DEFAULT_P 480
  385. #define ZGEMM_DEFAULT_P 112
  386. #define CGEMM_DEFAULT_P 224
  387. #endif
  388. #define QGEMM_DEFAULT_P 112
  389. #define XGEMM_DEFAULT_P 56
  390. #if defined(ARCH_X86_64)
  391. #define SGEMM_DEFAULT_Q 192
  392. #define DGEMM_DEFAULT_Q 160
  393. #define ZGEMM_DEFAULT_Q 160
  394. #define CGEMM_DEFAULT_Q 160
  395. #else
  396. #define SGEMM_DEFAULT_Q 224
  397. #define DGEMM_DEFAULT_Q 224
  398. #define ZGEMM_DEFAULT_Q 224
  399. #define CGEMM_DEFAULT_Q 224
  400. #endif
  401. #define QGEMM_DEFAULT_Q 224
  402. #define XGEMM_DEFAULT_Q 224
  403. #define CGEMM3M_DEFAULT_P 448
  404. #define ZGEMM3M_DEFAULT_P 224
  405. #define XGEMM3M_DEFAULT_P 112
  406. #define CGEMM3M_DEFAULT_Q 224
  407. #define ZGEMM3M_DEFAULT_Q 224
  408. #define XGEMM3M_DEFAULT_Q 224
  409. #define CGEMM3M_DEFAULT_R 12288
  410. #define ZGEMM3M_DEFAULT_R 12288
  411. #define XGEMM3M_DEFAULT_R 12288
  412. #define SGEMM_DEFAULT_R 12288
  413. #define QGEMM_DEFAULT_R qgemm_r
  414. #define DGEMM_DEFAULT_R 12288
  415. #define CGEMM_DEFAULT_R cgemm_r
  416. #define ZGEMM_DEFAULT_R zgemm_r
  417. #define XGEMM_DEFAULT_R xgemm_r
  418. #define SYMV_P 16
  419. #define HAVE_EXCLUSIVE_CACHE
  420. #define GEMM_THREAD gemm_thread_mn
  421. #endif
  422. #ifdef EXCAVATOR
  423. #define SNUMOPT 8
  424. #define DNUMOPT 4
  425. #define GEMM_DEFAULT_OFFSET_A 64
  426. #define GEMM_DEFAULT_OFFSET_B 832
  427. #define GEMM_DEFAULT_ALIGN 0x0fffUL
  428. #define QGEMM_DEFAULT_UNROLL_N 2
  429. #define CGEMM_DEFAULT_UNROLL_N 2
  430. #define ZGEMM_DEFAULT_UNROLL_N 2
  431. #define XGEMM_DEFAULT_UNROLL_N 1
  432. #ifdef ARCH_X86
  433. #define SGEMM_DEFAULT_UNROLL_N 4
  434. #define DGEMM_DEFAULT_UNROLL_N 4
  435. #define SGEMM_DEFAULT_UNROLL_M 4
  436. #define DGEMM_DEFAULT_UNROLL_M 2
  437. #define QGEMM_DEFAULT_UNROLL_M 2
  438. #define CGEMM_DEFAULT_UNROLL_M 2
  439. #define ZGEMM_DEFAULT_UNROLL_M 1
  440. #define XGEMM_DEFAULT_UNROLL_M 1
  441. #else
  442. #define SGEMM_DEFAULT_UNROLL_N 2
  443. #define DGEMM_DEFAULT_UNROLL_N 2
  444. #define SGEMM_DEFAULT_UNROLL_M 16
  445. #define DGEMM_DEFAULT_UNROLL_M 8
  446. #define QGEMM_DEFAULT_UNROLL_M 2
  447. #define CGEMM_DEFAULT_UNROLL_M 4
  448. #define ZGEMM_DEFAULT_UNROLL_M 2
  449. #define XGEMM_DEFAULT_UNROLL_M 1
  450. #define CGEMM3M_DEFAULT_UNROLL_N 4
  451. #define CGEMM3M_DEFAULT_UNROLL_M 8
  452. #define ZGEMM3M_DEFAULT_UNROLL_N 4
  453. #define ZGEMM3M_DEFAULT_UNROLL_M 4
  454. #define GEMV_UNROLL 8
  455. #endif
  456. #if defined(ARCH_X86_64)
  457. #define SGEMM_DEFAULT_P 768
  458. #define DGEMM_DEFAULT_P 576
  459. #define ZGEMM_DEFAULT_P 288
  460. #define CGEMM_DEFAULT_P 576
  461. #else
  462. #define SGEMM_DEFAULT_P 448
  463. #define DGEMM_DEFAULT_P 480
  464. #define ZGEMM_DEFAULT_P 112
  465. #define CGEMM_DEFAULT_P 224
  466. #endif
  467. #define QGEMM_DEFAULT_P 112
  468. #define XGEMM_DEFAULT_P 56
  469. #if defined(ARCH_X86_64)
  470. #define SGEMM_DEFAULT_Q 192
  471. #define DGEMM_DEFAULT_Q 160
  472. #define ZGEMM_DEFAULT_Q 160
  473. #define CGEMM_DEFAULT_Q 160
  474. #else
  475. #define SGEMM_DEFAULT_Q 224
  476. #define DGEMM_DEFAULT_Q 224
  477. #define ZGEMM_DEFAULT_Q 224
  478. #define CGEMM_DEFAULT_Q 224
  479. #endif
  480. #define QGEMM_DEFAULT_Q 224
  481. #define XGEMM_DEFAULT_Q 224
  482. #define CGEMM3M_DEFAULT_P 448
  483. #define ZGEMM3M_DEFAULT_P 224
  484. #define XGEMM3M_DEFAULT_P 112
  485. #define CGEMM3M_DEFAULT_Q 224
  486. #define ZGEMM3M_DEFAULT_Q 224
  487. #define XGEMM3M_DEFAULT_Q 224
  488. #define CGEMM3M_DEFAULT_R 12288
  489. #define ZGEMM3M_DEFAULT_R 12288
  490. #define XGEMM3M_DEFAULT_R 12288
  491. #define SGEMM_DEFAULT_R 12288
  492. #define QGEMM_DEFAULT_R qgemm_r
  493. #define DGEMM_DEFAULT_R 12288
  494. #define CGEMM_DEFAULT_R cgemm_r
  495. #define ZGEMM_DEFAULT_R zgemm_r
  496. #define XGEMM_DEFAULT_R xgemm_r
  497. #define SYMV_P 16
  498. #define HAVE_EXCLUSIVE_CACHE
  499. #define GEMM_THREAD gemm_thread_mn
  500. #endif
  501. #ifdef ZEN
  502. #define SNUMOPT 16
  503. #define DNUMOPT 8
  504. #define GEMM_DEFAULT_OFFSET_A 0
  505. #define GEMM_DEFAULT_OFFSET_B 0
  506. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  507. #define SYMV_P 8
  508. #define SWITCH_RATIO 4
  509. #ifdef ARCH_X86
  510. #define SGEMM_DEFAULT_UNROLL_M 4
  511. #define DGEMM_DEFAULT_UNROLL_M 2
  512. #define QGEMM_DEFAULT_UNROLL_M 2
  513. #define CGEMM_DEFAULT_UNROLL_M 2
  514. #define ZGEMM_DEFAULT_UNROLL_M 1
  515. #define XGEMM_DEFAULT_UNROLL_M 1
  516. #define SGEMM_DEFAULT_UNROLL_N 4
  517. #define DGEMM_DEFAULT_UNROLL_N 4
  518. #define QGEMM_DEFAULT_UNROLL_N 2
  519. #define CGEMM_DEFAULT_UNROLL_N 2
  520. #define ZGEMM_DEFAULT_UNROLL_N 2
  521. #define XGEMM_DEFAULT_UNROLL_N 1
  522. #else
  523. #define SGEMM_DEFAULT_UNROLL_M 16
  524. #define DGEMM_DEFAULT_UNROLL_M 4
  525. #define QGEMM_DEFAULT_UNROLL_M 2
  526. #define CGEMM_DEFAULT_UNROLL_M 8
  527. #define ZGEMM_DEFAULT_UNROLL_M 4
  528. #define XGEMM_DEFAULT_UNROLL_M 1
  529. #define SGEMM_DEFAULT_UNROLL_N 4
  530. #define DGEMM_DEFAULT_UNROLL_N 8
  531. #define QGEMM_DEFAULT_UNROLL_N 2
  532. #define CGEMM_DEFAULT_UNROLL_N 2
  533. #define ZGEMM_DEFAULT_UNROLL_N 2
  534. #define XGEMM_DEFAULT_UNROLL_N 1
  535. #define SGEMM_DEFAULT_UNROLL_MN 32
  536. #define DGEMM_DEFAULT_UNROLL_MN 32
  537. #endif
  538. #ifdef ARCH_X86
  539. #define SGEMM_DEFAULT_P 512
  540. #define SGEMM_DEFAULT_R sgemm_r
  541. #define DGEMM_DEFAULT_P 512
  542. #define DGEMM_DEFAULT_R dgemm_r
  543. #define QGEMM_DEFAULT_P 504
  544. #define QGEMM_DEFAULT_R qgemm_r
  545. #define CGEMM_DEFAULT_P 128
  546. #define CGEMM_DEFAULT_R 1024
  547. #define ZGEMM_DEFAULT_P 512
  548. #define ZGEMM_DEFAULT_R zgemm_r
  549. #define XGEMM_DEFAULT_P 252
  550. #define XGEMM_DEFAULT_R xgemm_r
  551. #define SGEMM_DEFAULT_Q 256
  552. #define DGEMM_DEFAULT_Q 256
  553. #define QGEMM_DEFAULT_Q 128
  554. #define CGEMM_DEFAULT_Q 256
  555. #define ZGEMM_DEFAULT_Q 192
  556. #define XGEMM_DEFAULT_Q 128
  557. #else
  558. #define SGEMM_DEFAULT_P 768
  559. #define DGEMM_DEFAULT_P 512
  560. #define CGEMM_DEFAULT_P 384
  561. #define ZGEMM_DEFAULT_P 256
  562. #ifdef WINDOWS_ABI
  563. #define SGEMM_DEFAULT_Q 320
  564. #define DGEMM_DEFAULT_Q 128
  565. #else
  566. #define SGEMM_DEFAULT_Q 384
  567. #define DGEMM_DEFAULT_Q 256
  568. #endif
  569. #define CGEMM_DEFAULT_Q 192
  570. #define ZGEMM_DEFAULT_Q 128
  571. #define SGEMM_DEFAULT_R sgemm_r
  572. #define DGEMM_DEFAULT_R 13824
  573. #define CGEMM_DEFAULT_R cgemm_r
  574. #define ZGEMM_DEFAULT_R zgemm_r
  575. #define QGEMM_DEFAULT_Q 128
  576. #define QGEMM_DEFAULT_P 504
  577. #define QGEMM_DEFAULT_R qgemm_r
  578. #define XGEMM_DEFAULT_P 252
  579. #define XGEMM_DEFAULT_R xgemm_r
  580. #define XGEMM_DEFAULT_Q 128
  581. #define CGEMM3M_DEFAULT_UNROLL_N 8
  582. #define CGEMM3M_DEFAULT_UNROLL_M 4
  583. #define ZGEMM3M_DEFAULT_UNROLL_N 8
  584. #define ZGEMM3M_DEFAULT_UNROLL_M 2
  585. #define CGEMM3M_DEFAULT_P 448
  586. #define ZGEMM3M_DEFAULT_P 224
  587. #define XGEMM3M_DEFAULT_P 112
  588. #define CGEMM3M_DEFAULT_Q 224
  589. #define ZGEMM3M_DEFAULT_Q 224
  590. #define XGEMM3M_DEFAULT_Q 224
  591. #define CGEMM3M_DEFAULT_R 12288
  592. #define ZGEMM3M_DEFAULT_R 12288
  593. #define XGEMM3M_DEFAULT_R 12288
  594. #endif
  595. #endif
  596. #ifdef ATHLON
  597. #define SNUMOPT 4
  598. #define DNUMOPT 2
  599. #define GEMM_DEFAULT_OFFSET_A 0
  600. #define GEMM_DEFAULT_OFFSET_B 384
  601. #define GEMM_DEFAULT_ALIGN 0x0ffffUL
  602. #define SGEMM_DEFAULT_UNROLL_N 4
  603. #define DGEMM_DEFAULT_UNROLL_N 4
  604. #define QGEMM_DEFAULT_UNROLL_N 2
  605. #define CGEMM_DEFAULT_UNROLL_N 2
  606. #define ZGEMM_DEFAULT_UNROLL_N 2
  607. #define XGEMM_DEFAULT_UNROLL_N 1
  608. #define SGEMM_DEFAULT_UNROLL_M 2
  609. #define DGEMM_DEFAULT_UNROLL_M 1
  610. #define QGEMM_DEFAULT_UNROLL_M 2
  611. #define CGEMM_DEFAULT_UNROLL_M 1
  612. #define ZGEMM_DEFAULT_UNROLL_M 1
  613. #define XGEMM_DEFAULT_UNROLL_M 1
  614. #define SGEMM_DEFAULT_R sgemm_r
  615. #define DGEMM_DEFAULT_R dgemm_r
  616. #define QGEMM_DEFAULT_R qgemm_r
  617. #define CGEMM_DEFAULT_R cgemm_r
  618. #define ZGEMM_DEFAULT_R zgemm_r
  619. #define XGEMM_DEFAULT_R xgemm_r
  620. #define SGEMM_DEFAULT_P 208
  621. #define DGEMM_DEFAULT_P 104
  622. #define QGEMM_DEFAULT_P 56
  623. #define CGEMM_DEFAULT_P 104
  624. #define ZGEMM_DEFAULT_P 56
  625. #define XGEMM_DEFAULT_P 28
  626. #define SGEMM_DEFAULT_Q 208
  627. #define DGEMM_DEFAULT_Q 208
  628. #define QGEMM_DEFAULT_Q 208
  629. #define CGEMM_DEFAULT_Q 208
  630. #define ZGEMM_DEFAULT_Q 208
  631. #define XGEMM_DEFAULT_Q 208
  632. #define SYMV_P 16
  633. #define HAVE_EXCLUSIVE_CACHE
  634. #endif
  635. #ifdef VIAC3
  636. #define SNUMOPT 2
  637. #define DNUMOPT 1
  638. #define GEMM_DEFAULT_OFFSET_A 0
  639. #define GEMM_DEFAULT_OFFSET_B 256
  640. #define GEMM_DEFAULT_ALIGN 0x0ffffUL
  641. #define SGEMM_DEFAULT_UNROLL_N 4
  642. #define DGEMM_DEFAULT_UNROLL_N 4
  643. #define QGEMM_DEFAULT_UNROLL_N 2
  644. #define CGEMM_DEFAULT_UNROLL_N 2
  645. #define ZGEMM_DEFAULT_UNROLL_N 2
  646. #define XGEMM_DEFAULT_UNROLL_N 1
  647. #define SGEMM_DEFAULT_UNROLL_M 2
  648. #define DGEMM_DEFAULT_UNROLL_M 1
  649. #define QGEMM_DEFAULT_UNROLL_M 2
  650. #define CGEMM_DEFAULT_UNROLL_M 1
  651. #define ZGEMM_DEFAULT_UNROLL_M 1
  652. #define XGEMM_DEFAULT_UNROLL_M 1
  653. #define SGEMM_DEFAULT_R sgemm_r
  654. #define DGEMM_DEFAULT_R dgemm_r
  655. #define QGEMM_DEFAULT_R qgemm_r
  656. #define CGEMM_DEFAULT_R cgemm_r
  657. #define ZGEMM_DEFAULT_R zgemm_r
  658. #define XGEMM_DEFAULT_R xgemm_r
  659. #define SGEMM_DEFAULT_P 128
  660. #define DGEMM_DEFAULT_P 128
  661. #define QGEMM_DEFAULT_P 128
  662. #define CGEMM_DEFAULT_P 128
  663. #define ZGEMM_DEFAULT_P 128
  664. #define XGEMM_DEFAULT_P 128
  665. #define SGEMM_DEFAULT_Q 512
  666. #define DGEMM_DEFAULT_Q 256
  667. #define QGEMM_DEFAULT_Q 256
  668. #define CGEMM_DEFAULT_Q 256
  669. #define ZGEMM_DEFAULT_Q 128
  670. #define XGEMM_DEFAULT_Q 128
  671. #define SYMV_P 16
  672. #endif
  673. #ifdef NANO
  674. #define SNUMOPT 4
  675. #define DNUMOPT 2
  676. #define GEMM_DEFAULT_OFFSET_A 64
  677. #define GEMM_DEFAULT_OFFSET_B 256
  678. #define GEMM_DEFAULT_ALIGN 0x01ffffUL
  679. #ifdef ARCH_X86
  680. #define SGEMM_DEFAULT_UNROLL_N 4
  681. #define DGEMM_DEFAULT_UNROLL_N 4
  682. #define QGEMM_DEFAULT_UNROLL_N 2
  683. #define CGEMM_DEFAULT_UNROLL_N 2
  684. #define ZGEMM_DEFAULT_UNROLL_N 2
  685. #define XGEMM_DEFAULT_UNROLL_N 1
  686. #define SGEMM_DEFAULT_UNROLL_M 4
  687. #define DGEMM_DEFAULT_UNROLL_M 2
  688. #define QGEMM_DEFAULT_UNROLL_M 2
  689. #define CGEMM_DEFAULT_UNROLL_M 2
  690. #define ZGEMM_DEFAULT_UNROLL_M 1
  691. #define XGEMM_DEFAULT_UNROLL_M 1
  692. #else
  693. #define SGEMM_DEFAULT_UNROLL_N 8
  694. #define DGEMM_DEFAULT_UNROLL_N 4
  695. #define QGEMM_DEFAULT_UNROLL_N 2
  696. #define CGEMM_DEFAULT_UNROLL_N 4
  697. #define ZGEMM_DEFAULT_UNROLL_N 2
  698. #define XGEMM_DEFAULT_UNROLL_N 1
  699. #define SGEMM_DEFAULT_UNROLL_M 4
  700. #define DGEMM_DEFAULT_UNROLL_M 4
  701. #define QGEMM_DEFAULT_UNROLL_M 2
  702. #define CGEMM_DEFAULT_UNROLL_M 2
  703. #define ZGEMM_DEFAULT_UNROLL_M 2
  704. #define XGEMM_DEFAULT_UNROLL_M 1
  705. #endif
  706. #define SGEMM_DEFAULT_P 288
  707. #define DGEMM_DEFAULT_P 288
  708. #define QGEMM_DEFAULT_P 288
  709. #define CGEMM_DEFAULT_P 288
  710. #define ZGEMM_DEFAULT_P 288
  711. #define XGEMM_DEFAULT_P 288
  712. #define SGEMM_DEFAULT_R sgemm_r
  713. #define DGEMM_DEFAULT_R dgemm_r
  714. #define QGEMM_DEFAULT_R qgemm_r
  715. #define CGEMM_DEFAULT_R cgemm_r
  716. #define ZGEMM_DEFAULT_R zgemm_r
  717. #define XGEMM_DEFAULT_R xgemm_r
  718. #define SGEMM_DEFAULT_Q 256
  719. #define DGEMM_DEFAULT_Q 128
  720. #define QGEMM_DEFAULT_Q 64
  721. #define CGEMM_DEFAULT_Q 128
  722. #define ZGEMM_DEFAULT_Q 64
  723. #define XGEMM_DEFAULT_Q 32
  724. #define SYMV_P 16
  725. #define HAVE_EXCLUSIVE_CACHE
  726. #endif
  727. #if defined(PENTIUM) || defined(PENTIUM2) || defined(PENTIUM3)
  728. #ifdef HAVE_SSE
  729. #define SNUMOPT 2
  730. #else
  731. #define SNUMOPT 1
  732. #endif
  733. #define DNUMOPT 1
  734. #define GEMM_DEFAULT_OFFSET_A 0
  735. #define GEMM_DEFAULT_OFFSET_B 0
  736. #define GEMM_DEFAULT_ALIGN 0x0ffffUL
  737. #ifdef HAVE_SSE
  738. #define SGEMM_DEFAULT_UNROLL_M 8
  739. #define CGEMM_DEFAULT_UNROLL_M 4
  740. #else
  741. #define SGEMM_DEFAULT_UNROLL_M 4
  742. #define CGEMM_DEFAULT_UNROLL_M 2
  743. #endif
  744. #define DGEMM_DEFAULT_UNROLL_M 2
  745. #define SGEMM_DEFAULT_UNROLL_N 2
  746. #define DGEMM_DEFAULT_UNROLL_N 2
  747. #define QGEMM_DEFAULT_UNROLL_M 2
  748. #define QGEMM_DEFAULT_UNROLL_N 2
  749. #define CGEMM_DEFAULT_UNROLL_N 1
  750. #define ZGEMM_DEFAULT_UNROLL_M 1
  751. #define ZGEMM_DEFAULT_UNROLL_N 1
  752. #define XGEMM_DEFAULT_UNROLL_M 1
  753. #define XGEMM_DEFAULT_UNROLL_N 1
  754. #define SGEMM_DEFAULT_P sgemm_p
  755. #define SGEMM_DEFAULT_Q 256
  756. #define SGEMM_DEFAULT_R sgemm_r
  757. #define DGEMM_DEFAULT_P dgemm_p
  758. #define DGEMM_DEFAULT_Q 256
  759. #define DGEMM_DEFAULT_R dgemm_r
  760. #define QGEMM_DEFAULT_P qgemm_p
  761. #define QGEMM_DEFAULT_Q 256
  762. #define QGEMM_DEFAULT_R qgemm_r
  763. #define CGEMM_DEFAULT_P cgemm_p
  764. #define CGEMM_DEFAULT_Q 256
  765. #define CGEMM_DEFAULT_R cgemm_r
  766. #define ZGEMM_DEFAULT_P zgemm_p
  767. #define ZGEMM_DEFAULT_Q 256
  768. #define ZGEMM_DEFAULT_R zgemm_r
  769. #define XGEMM_DEFAULT_P xgemm_p
  770. #define XGEMM_DEFAULT_Q 256
  771. #define XGEMM_DEFAULT_R xgemm_r
  772. #define SYMV_P 4
  773. #endif
  774. #ifdef PENTIUMM
  775. #define SNUMOPT 2
  776. #define DNUMOPT 1
  777. #define GEMM_DEFAULT_OFFSET_A 0
  778. #define GEMM_DEFAULT_OFFSET_B 0
  779. #define GEMM_DEFAULT_ALIGN 0x0ffffUL
  780. #ifdef CORE_YONAH
  781. #define SGEMM_DEFAULT_UNROLL_M 4
  782. #define SGEMM_DEFAULT_UNROLL_N 4
  783. #define DGEMM_DEFAULT_UNROLL_M 2
  784. #define DGEMM_DEFAULT_UNROLL_N 4
  785. #define QGEMM_DEFAULT_UNROLL_M 2
  786. #define QGEMM_DEFAULT_UNROLL_N 2
  787. #define CGEMM_DEFAULT_UNROLL_M 2
  788. #define CGEMM_DEFAULT_UNROLL_N 2
  789. #define ZGEMM_DEFAULT_UNROLL_M 1
  790. #define ZGEMM_DEFAULT_UNROLL_N 2
  791. #define XGEMM_DEFAULT_UNROLL_M 1
  792. #define XGEMM_DEFAULT_UNROLL_N 1
  793. #else
  794. #define SGEMM_DEFAULT_UNROLL_M 8
  795. #define SGEMM_DEFAULT_UNROLL_N 2
  796. #define DGEMM_DEFAULT_UNROLL_M 2
  797. #define DGEMM_DEFAULT_UNROLL_N 2
  798. #define QGEMM_DEFAULT_UNROLL_M 2
  799. #define QGEMM_DEFAULT_UNROLL_N 2
  800. #define CGEMM_DEFAULT_UNROLL_M 4
  801. #define CGEMM_DEFAULT_UNROLL_N 1
  802. #define ZGEMM_DEFAULT_UNROLL_M 1
  803. #define ZGEMM_DEFAULT_UNROLL_N 1
  804. #define XGEMM_DEFAULT_UNROLL_M 1
  805. #define XGEMM_DEFAULT_UNROLL_N 1
  806. #endif
  807. #define SGEMM_DEFAULT_P sgemm_p
  808. #define SGEMM_DEFAULT_Q 256
  809. #define SGEMM_DEFAULT_R sgemm_r
  810. #define DGEMM_DEFAULT_P dgemm_p
  811. #define DGEMM_DEFAULT_Q 256
  812. #define DGEMM_DEFAULT_R dgemm_r
  813. #define QGEMM_DEFAULT_P qgemm_p
  814. #define QGEMM_DEFAULT_Q 256
  815. #define QGEMM_DEFAULT_R qgemm_r
  816. #define CGEMM_DEFAULT_P cgemm_p
  817. #define CGEMM_DEFAULT_Q 256
  818. #define CGEMM_DEFAULT_R cgemm_r
  819. #define ZGEMM_DEFAULT_P zgemm_p
  820. #define ZGEMM_DEFAULT_Q 256
  821. #define ZGEMM_DEFAULT_R zgemm_r
  822. #define XGEMM_DEFAULT_P xgemm_p
  823. #define XGEMM_DEFAULT_Q 256
  824. #define XGEMM_DEFAULT_R xgemm_r
  825. #define SYMV_P 4
  826. #endif
  827. #ifdef CORE_NORTHWOOD
  828. #define SNUMOPT 4
  829. #define DNUMOPT 2
  830. #define GEMM_DEFAULT_OFFSET_A 0
  831. #define GEMM_DEFAULT_OFFSET_B 32
  832. #define GEMM_DEFAULT_ALIGN 0x0ffffUL
  833. #define SYMV_P 8
  834. #define SGEMM_DEFAULT_UNROLL_M 8
  835. #define DGEMM_DEFAULT_UNROLL_M 4
  836. #define QGEMM_DEFAULT_UNROLL_M 2
  837. #define CGEMM_DEFAULT_UNROLL_M 4
  838. #define ZGEMM_DEFAULT_UNROLL_M 2
  839. #define XGEMM_DEFAULT_UNROLL_M 1
  840. #define SGEMM_DEFAULT_UNROLL_N 2
  841. #define DGEMM_DEFAULT_UNROLL_N 2
  842. #define QGEMM_DEFAULT_UNROLL_N 2
  843. #define CGEMM_DEFAULT_UNROLL_N 1
  844. #define ZGEMM_DEFAULT_UNROLL_N 1
  845. #define XGEMM_DEFAULT_UNROLL_N 1
  846. #define SGEMM_DEFAULT_P sgemm_p
  847. #define SGEMM_DEFAULT_R sgemm_r
  848. #define DGEMM_DEFAULT_P dgemm_p
  849. #define DGEMM_DEFAULT_R dgemm_r
  850. #define QGEMM_DEFAULT_P qgemm_p
  851. #define QGEMM_DEFAULT_R qgemm_r
  852. #define CGEMM_DEFAULT_P cgemm_p
  853. #define CGEMM_DEFAULT_R cgemm_r
  854. #define ZGEMM_DEFAULT_P zgemm_p
  855. #define ZGEMM_DEFAULT_R zgemm_r
  856. #define XGEMM_DEFAULT_P xgemm_p
  857. #define XGEMM_DEFAULT_R xgemm_r
  858. #define SGEMM_DEFAULT_Q 128
  859. #define DGEMM_DEFAULT_Q 128
  860. #define QGEMM_DEFAULT_Q 128
  861. #define CGEMM_DEFAULT_Q 128
  862. #define ZGEMM_DEFAULT_Q 128
  863. #define XGEMM_DEFAULT_Q 128
  864. #endif
  865. #ifdef CORE_PRESCOTT
  866. #define SNUMOPT 4
  867. #define DNUMOPT 2
  868. #ifndef __64BIT__
  869. #define GEMM_DEFAULT_OFFSET_A 128
  870. #define GEMM_DEFAULT_OFFSET_B 192
  871. #else
  872. #define GEMM_DEFAULT_OFFSET_A 0
  873. #define GEMM_DEFAULT_OFFSET_B 256
  874. #endif
  875. #define GEMM_DEFAULT_ALIGN 0x0ffffUL
  876. #define SYMV_P 8
  877. #ifdef ARCH_X86
  878. #define SGEMM_DEFAULT_UNROLL_M 4
  879. #define DGEMM_DEFAULT_UNROLL_M 2
  880. #define QGEMM_DEFAULT_UNROLL_M 2
  881. #define CGEMM_DEFAULT_UNROLL_M 2
  882. #define ZGEMM_DEFAULT_UNROLL_M 1
  883. #define XGEMM_DEFAULT_UNROLL_M 1
  884. #else
  885. #define SGEMM_DEFAULT_UNROLL_M 8
  886. #define DGEMM_DEFAULT_UNROLL_M 4
  887. #define QGEMM_DEFAULT_UNROLL_M 2
  888. #define CGEMM_DEFAULT_UNROLL_M 4
  889. #define ZGEMM_DEFAULT_UNROLL_M 2
  890. #define XGEMM_DEFAULT_UNROLL_M 1
  891. #endif
  892. #define SGEMM_DEFAULT_UNROLL_N 4
  893. #define DGEMM_DEFAULT_UNROLL_N 4
  894. #define QGEMM_DEFAULT_UNROLL_N 2
  895. #define CGEMM_DEFAULT_UNROLL_N 2
  896. #define ZGEMM_DEFAULT_UNROLL_N 2
  897. #define XGEMM_DEFAULT_UNROLL_N 1
  898. #define SGEMM_DEFAULT_P sgemm_p
  899. #define SGEMM_DEFAULT_R sgemm_r
  900. #define DGEMM_DEFAULT_P dgemm_p
  901. #define DGEMM_DEFAULT_R dgemm_r
  902. #define QGEMM_DEFAULT_P qgemm_p
  903. #define QGEMM_DEFAULT_R qgemm_r
  904. #define CGEMM_DEFAULT_P cgemm_p
  905. #define CGEMM_DEFAULT_R cgemm_r
  906. #define ZGEMM_DEFAULT_P zgemm_p
  907. #define ZGEMM_DEFAULT_R zgemm_r
  908. #define XGEMM_DEFAULT_P xgemm_p
  909. #define XGEMM_DEFAULT_R xgemm_r
  910. #define SGEMM_DEFAULT_Q 128
  911. #define DGEMM_DEFAULT_Q 128
  912. #define QGEMM_DEFAULT_Q 128
  913. #define CGEMM_DEFAULT_Q 128
  914. #define ZGEMM_DEFAULT_Q 128
  915. #define XGEMM_DEFAULT_Q 128
  916. #endif
  917. #ifdef CORE2
  918. #define SNUMOPT 8
  919. #define DNUMOPT 4
  920. #define GEMM_DEFAULT_OFFSET_A 448
  921. #define GEMM_DEFAULT_OFFSET_B 128
  922. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  923. #define SYMV_P 8
  924. #define SWITCH_RATIO 4
  925. #ifdef ARCH_X86
  926. #define SGEMM_DEFAULT_UNROLL_M 8
  927. #define DGEMM_DEFAULT_UNROLL_M 4
  928. #define QGEMM_DEFAULT_UNROLL_M 2
  929. #define CGEMM_DEFAULT_UNROLL_M 4
  930. #define ZGEMM_DEFAULT_UNROLL_M 2
  931. #define XGEMM_DEFAULT_UNROLL_M 1
  932. #define SGEMM_DEFAULT_UNROLL_N 2
  933. #define DGEMM_DEFAULT_UNROLL_N 2
  934. #define QGEMM_DEFAULT_UNROLL_N 2
  935. #define CGEMM_DEFAULT_UNROLL_N 1
  936. #define ZGEMM_DEFAULT_UNROLL_N 1
  937. #define XGEMM_DEFAULT_UNROLL_N 1
  938. #define MASK(a, b) ((((a) + (b) - 1) / (b)) * (b))
  939. #else
  940. #define SGEMM_DEFAULT_UNROLL_M 8
  941. #define DGEMM_DEFAULT_UNROLL_M 4
  942. #define QGEMM_DEFAULT_UNROLL_M 2
  943. #define CGEMM_DEFAULT_UNROLL_M 4
  944. #define ZGEMM_DEFAULT_UNROLL_M 2
  945. #define XGEMM_DEFAULT_UNROLL_M 1
  946. #define SGEMM_DEFAULT_UNROLL_N 4
  947. #define DGEMM_DEFAULT_UNROLL_N 4
  948. #define QGEMM_DEFAULT_UNROLL_N 2
  949. #define CGEMM_DEFAULT_UNROLL_N 2
  950. #define ZGEMM_DEFAULT_UNROLL_N 2
  951. #define XGEMM_DEFAULT_UNROLL_N 1
  952. #endif
  953. #define SGEMM_DEFAULT_P sgemm_p
  954. #define SGEMM_DEFAULT_R sgemm_r
  955. #define DGEMM_DEFAULT_P dgemm_p
  956. #define DGEMM_DEFAULT_R dgemm_r
  957. #define QGEMM_DEFAULT_P qgemm_p
  958. #define QGEMM_DEFAULT_R qgemm_r
  959. #define CGEMM_DEFAULT_P cgemm_p
  960. #define CGEMM_DEFAULT_R cgemm_r
  961. #define ZGEMM_DEFAULT_P zgemm_p
  962. #define ZGEMM_DEFAULT_R zgemm_r
  963. #define XGEMM_DEFAULT_P xgemm_p
  964. #define XGEMM_DEFAULT_R xgemm_r
  965. #define SGEMM_DEFAULT_Q 256
  966. #define DGEMM_DEFAULT_Q 256
  967. #define QGEMM_DEFAULT_Q 256
  968. #define CGEMM_DEFAULT_Q 256
  969. #define ZGEMM_DEFAULT_Q 256
  970. #define XGEMM_DEFAULT_Q 256
  971. #endif
  972. #ifdef PENRYN
  973. #define SNUMOPT 8
  974. #define DNUMOPT 4
  975. #define GEMM_DEFAULT_OFFSET_A 128
  976. #define GEMM_DEFAULT_OFFSET_B 0
  977. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  978. #define SYMV_P 8
  979. #define SWITCH_RATIO 4
  980. #ifdef ARCH_X86
  981. #define SGEMM_DEFAULT_UNROLL_M 4
  982. #define DGEMM_DEFAULT_UNROLL_M 2
  983. #define QGEMM_DEFAULT_UNROLL_M 2
  984. #define CGEMM_DEFAULT_UNROLL_M 2
  985. #define ZGEMM_DEFAULT_UNROLL_M 1
  986. #define XGEMM_DEFAULT_UNROLL_M 1
  987. #define SGEMM_DEFAULT_UNROLL_N 4
  988. #define DGEMM_DEFAULT_UNROLL_N 4
  989. #define QGEMM_DEFAULT_UNROLL_N 2
  990. #define CGEMM_DEFAULT_UNROLL_N 2
  991. #define ZGEMM_DEFAULT_UNROLL_N 2
  992. #define XGEMM_DEFAULT_UNROLL_N 1
  993. #else
  994. #define SGEMM_DEFAULT_UNROLL_M 8
  995. #define DGEMM_DEFAULT_UNROLL_M 4
  996. #define QGEMM_DEFAULT_UNROLL_M 2
  997. #define CGEMM_DEFAULT_UNROLL_M 4
  998. #define ZGEMM_DEFAULT_UNROLL_M 2
  999. #define XGEMM_DEFAULT_UNROLL_M 1
  1000. #define SGEMM_DEFAULT_UNROLL_N 4
  1001. #define DGEMM_DEFAULT_UNROLL_N 4
  1002. #define QGEMM_DEFAULT_UNROLL_N 2
  1003. #define CGEMM_DEFAULT_UNROLL_N 2
  1004. #define ZGEMM_DEFAULT_UNROLL_N 2
  1005. #define XGEMM_DEFAULT_UNROLL_N 1
  1006. #endif
  1007. #define SGEMM_DEFAULT_P sgemm_p
  1008. #define SGEMM_DEFAULT_R sgemm_r
  1009. #define DGEMM_DEFAULT_P dgemm_p
  1010. #define DGEMM_DEFAULT_R dgemm_r
  1011. #define QGEMM_DEFAULT_P qgemm_p
  1012. #define QGEMM_DEFAULT_R qgemm_r
  1013. #define CGEMM_DEFAULT_P cgemm_p
  1014. #define CGEMM_DEFAULT_R cgemm_r
  1015. #define ZGEMM_DEFAULT_P zgemm_p
  1016. #define ZGEMM_DEFAULT_R zgemm_r
  1017. #define XGEMM_DEFAULT_P xgemm_p
  1018. #define XGEMM_DEFAULT_R xgemm_r
  1019. #define SGEMM_DEFAULT_Q 512
  1020. #define DGEMM_DEFAULT_Q 256
  1021. #define QGEMM_DEFAULT_Q 128
  1022. #define CGEMM_DEFAULT_Q 512
  1023. #define ZGEMM_DEFAULT_Q 256
  1024. #define XGEMM_DEFAULT_Q 128
  1025. #define GETRF_FACTOR 0.75
  1026. #endif
  1027. #ifdef DUNNINGTON
  1028. #define SNUMOPT 8
  1029. #define DNUMOPT 4
  1030. #define GEMM_DEFAULT_OFFSET_A 128
  1031. #define GEMM_DEFAULT_OFFSET_B 0
  1032. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  1033. #define SYMV_P 8
  1034. #define SWITCH_RATIO 4
  1035. #ifdef ARCH_X86
  1036. #define SGEMM_DEFAULT_UNROLL_M 4
  1037. #define DGEMM_DEFAULT_UNROLL_M 2
  1038. #define QGEMM_DEFAULT_UNROLL_M 2
  1039. #define CGEMM_DEFAULT_UNROLL_M 2
  1040. #define ZGEMM_DEFAULT_UNROLL_M 1
  1041. #define XGEMM_DEFAULT_UNROLL_M 1
  1042. #define SGEMM_DEFAULT_UNROLL_N 4
  1043. #define DGEMM_DEFAULT_UNROLL_N 4
  1044. #define QGEMM_DEFAULT_UNROLL_N 2
  1045. #define CGEMM_DEFAULT_UNROLL_N 2
  1046. #define ZGEMM_DEFAULT_UNROLL_N 2
  1047. #define XGEMM_DEFAULT_UNROLL_N 1
  1048. #else
  1049. #define SGEMM_DEFAULT_UNROLL_M 8
  1050. #define DGEMM_DEFAULT_UNROLL_M 4
  1051. #define QGEMM_DEFAULT_UNROLL_M 2
  1052. #define CGEMM_DEFAULT_UNROLL_M 4
  1053. #define ZGEMM_DEFAULT_UNROLL_M 2
  1054. #define XGEMM_DEFAULT_UNROLL_M 1
  1055. #define SGEMM_DEFAULT_UNROLL_N 4
  1056. #define DGEMM_DEFAULT_UNROLL_N 4
  1057. #define QGEMM_DEFAULT_UNROLL_N 2
  1058. #define CGEMM_DEFAULT_UNROLL_N 2
  1059. #define ZGEMM_DEFAULT_UNROLL_N 2
  1060. #define XGEMM_DEFAULT_UNROLL_N 1
  1061. #endif
  1062. #define SGEMM_DEFAULT_P sgemm_p
  1063. #define SGEMM_DEFAULT_R sgemm_r
  1064. #define DGEMM_DEFAULT_P dgemm_p
  1065. #define DGEMM_DEFAULT_R dgemm_r
  1066. #define QGEMM_DEFAULT_P qgemm_p
  1067. #define QGEMM_DEFAULT_R qgemm_r
  1068. #define CGEMM_DEFAULT_P cgemm_p
  1069. #define CGEMM_DEFAULT_R cgemm_r
  1070. #define ZGEMM_DEFAULT_P zgemm_p
  1071. #define ZGEMM_DEFAULT_R zgemm_r
  1072. #define XGEMM_DEFAULT_P xgemm_p
  1073. #define XGEMM_DEFAULT_R xgemm_r
  1074. #define SGEMM_DEFAULT_Q 768
  1075. #define DGEMM_DEFAULT_Q 384
  1076. #define QGEMM_DEFAULT_Q 192
  1077. #define CGEMM_DEFAULT_Q 768
  1078. #define ZGEMM_DEFAULT_Q 384
  1079. #define XGEMM_DEFAULT_Q 192
  1080. #define GETRF_FACTOR 0.75
  1081. #define GEMM_THREAD gemm_thread_mn
  1082. #endif
  1083. #ifdef NEHALEM
  1084. #define SNUMOPT 8
  1085. #define DNUMOPT 4
  1086. #define GEMM_DEFAULT_OFFSET_A 32
  1087. #define GEMM_DEFAULT_OFFSET_B 0
  1088. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  1089. #define SYMV_P 8
  1090. #define SWITCH_RATIO 4
  1091. #ifdef ARCH_X86
  1092. #define SGEMM_DEFAULT_UNROLL_M 4
  1093. #define DGEMM_DEFAULT_UNROLL_M 2
  1094. #define QGEMM_DEFAULT_UNROLL_M 2
  1095. #define CGEMM_DEFAULT_UNROLL_M 2
  1096. #define ZGEMM_DEFAULT_UNROLL_M 1
  1097. #define XGEMM_DEFAULT_UNROLL_M 1
  1098. #define SGEMM_DEFAULT_UNROLL_N 4
  1099. #define DGEMM_DEFAULT_UNROLL_N 4
  1100. #define QGEMM_DEFAULT_UNROLL_N 2
  1101. #define CGEMM_DEFAULT_UNROLL_N 2
  1102. #define ZGEMM_DEFAULT_UNROLL_N 2
  1103. #define XGEMM_DEFAULT_UNROLL_N 1
  1104. #else
  1105. #define SGEMM_DEFAULT_UNROLL_M 4
  1106. #define DGEMM_DEFAULT_UNROLL_M 2
  1107. #define QGEMM_DEFAULT_UNROLL_M 2
  1108. #define CGEMM_DEFAULT_UNROLL_M 2
  1109. #define ZGEMM_DEFAULT_UNROLL_M 1
  1110. #define XGEMM_DEFAULT_UNROLL_M 1
  1111. #define SGEMM_DEFAULT_UNROLL_N 8
  1112. #define DGEMM_DEFAULT_UNROLL_N 8
  1113. #define QGEMM_DEFAULT_UNROLL_N 2
  1114. #define CGEMM_DEFAULT_UNROLL_N 4
  1115. #define ZGEMM_DEFAULT_UNROLL_N 4
  1116. #define XGEMM_DEFAULT_UNROLL_N 1
  1117. #endif
  1118. #define SGEMM_DEFAULT_P 504
  1119. #define SGEMM_DEFAULT_R sgemm_r
  1120. #define DGEMM_DEFAULT_P 504
  1121. #define DGEMM_DEFAULT_R dgemm_r
  1122. #define QGEMM_DEFAULT_P 504
  1123. #define QGEMM_DEFAULT_R qgemm_r
  1124. #define CGEMM_DEFAULT_P 252
  1125. #define CGEMM_DEFAULT_R cgemm_r
  1126. #define ZGEMM_DEFAULT_P 252
  1127. #define ZGEMM_DEFAULT_R zgemm_r
  1128. #define XGEMM_DEFAULT_P 252
  1129. #define XGEMM_DEFAULT_R xgemm_r
  1130. #define SGEMM_DEFAULT_Q 512
  1131. #define DGEMM_DEFAULT_Q 256
  1132. #define QGEMM_DEFAULT_Q 128
  1133. #define CGEMM_DEFAULT_Q 512
  1134. #define ZGEMM_DEFAULT_Q 256
  1135. #define XGEMM_DEFAULT_Q 128
  1136. #define GETRF_FACTOR 0.72
  1137. #endif
  1138. #ifdef SANDYBRIDGE
  1139. #define SNUMOPT 8
  1140. #define DNUMOPT 4
  1141. #define GEMM_DEFAULT_OFFSET_A 0
  1142. #define GEMM_DEFAULT_OFFSET_B 0
  1143. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  1144. #define SYMV_P 8
  1145. #define SWITCH_RATIO 4
  1146. #ifdef ARCH_X86
  1147. #define SGEMM_DEFAULT_UNROLL_M 4
  1148. #define DGEMM_DEFAULT_UNROLL_M 2
  1149. #define QGEMM_DEFAULT_UNROLL_M 2
  1150. #define CGEMM_DEFAULT_UNROLL_M 2
  1151. #define ZGEMM_DEFAULT_UNROLL_M 1
  1152. #define XGEMM_DEFAULT_UNROLL_M 1
  1153. #define SGEMM_DEFAULT_UNROLL_N 4
  1154. #define DGEMM_DEFAULT_UNROLL_N 4
  1155. #define QGEMM_DEFAULT_UNROLL_N 2
  1156. #define CGEMM_DEFAULT_UNROLL_N 2
  1157. #define ZGEMM_DEFAULT_UNROLL_N 2
  1158. #define XGEMM_DEFAULT_UNROLL_N 1
  1159. #else
  1160. #define SGEMM_DEFAULT_UNROLL_M 16
  1161. #define DGEMM_DEFAULT_UNROLL_M 8
  1162. #define QGEMM_DEFAULT_UNROLL_M 2
  1163. #define CGEMM_DEFAULT_UNROLL_M 8
  1164. #define ZGEMM_DEFAULT_UNROLL_M 1
  1165. #define XGEMM_DEFAULT_UNROLL_M 1
  1166. #define SGEMM_DEFAULT_UNROLL_N 4
  1167. #define DGEMM_DEFAULT_UNROLL_N 4
  1168. #define QGEMM_DEFAULT_UNROLL_N 2
  1169. #define CGEMM_DEFAULT_UNROLL_N 2
  1170. #define ZGEMM_DEFAULT_UNROLL_N 4
  1171. #define XGEMM_DEFAULT_UNROLL_N 1
  1172. #endif
  1173. #define SGEMM_DEFAULT_P 768
  1174. #define SGEMM_DEFAULT_R sgemm_r
  1175. //#define SGEMM_DEFAULT_R 1024
  1176. #define DGEMM_DEFAULT_P 512
  1177. #define DGEMM_DEFAULT_R dgemm_r
  1178. //#define DGEMM_DEFAULT_R 1024
  1179. #define QGEMM_DEFAULT_P 504
  1180. #define QGEMM_DEFAULT_R qgemm_r
  1181. #define CGEMM_DEFAULT_P 768
  1182. #define CGEMM_DEFAULT_R cgemm_r
  1183. //#define CGEMM_DEFAULT_R 1024
  1184. #define ZGEMM_DEFAULT_P 512
  1185. #define ZGEMM_DEFAULT_R zgemm_r
  1186. //#define ZGEMM_DEFAULT_R 1024
  1187. #define XGEMM_DEFAULT_P 252
  1188. #define XGEMM_DEFAULT_R xgemm_r
  1189. #define SGEMM_DEFAULT_Q 384
  1190. #define DGEMM_DEFAULT_Q 256
  1191. #define QGEMM_DEFAULT_Q 128
  1192. #define CGEMM_DEFAULT_Q 512
  1193. #define ZGEMM_DEFAULT_Q 192
  1194. #define XGEMM_DEFAULT_Q 128
  1195. #define CGEMM3M_DEFAULT_UNROLL_N 8
  1196. #define CGEMM3M_DEFAULT_UNROLL_M 4
  1197. #define ZGEMM3M_DEFAULT_UNROLL_N 8
  1198. #define ZGEMM3M_DEFAULT_UNROLL_M 2
  1199. #define CGEMM3M_DEFAULT_P 448
  1200. #define ZGEMM3M_DEFAULT_P 224
  1201. #define XGEMM3M_DEFAULT_P 112
  1202. #define CGEMM3M_DEFAULT_Q 224
  1203. #define ZGEMM3M_DEFAULT_Q 224
  1204. #define XGEMM3M_DEFAULT_Q 224
  1205. #define CGEMM3M_DEFAULT_R 12288
  1206. #define ZGEMM3M_DEFAULT_R 12288
  1207. #define XGEMM3M_DEFAULT_R 12288
  1208. #define GETRF_FACTOR 0.72
  1209. #endif
  1210. #ifdef HASWELL
  1211. #define SNUMOPT 16
  1212. #define DNUMOPT 8
  1213. #define GEMM_DEFAULT_OFFSET_A 0
  1214. #define GEMM_DEFAULT_OFFSET_B 0
  1215. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  1216. #define SYMV_P 8
  1217. #define SWITCH_RATIO 32
  1218. #ifdef ARCH_X86
  1219. #define SGEMM_DEFAULT_UNROLL_M 4
  1220. #define DGEMM_DEFAULT_UNROLL_M 2
  1221. #define QGEMM_DEFAULT_UNROLL_M 2
  1222. #define CGEMM_DEFAULT_UNROLL_M 2
  1223. #define ZGEMM_DEFAULT_UNROLL_M 1
  1224. #define XGEMM_DEFAULT_UNROLL_M 1
  1225. #define SGEMM_DEFAULT_UNROLL_N 4
  1226. #define DGEMM_DEFAULT_UNROLL_N 4
  1227. #define QGEMM_DEFAULT_UNROLL_N 2
  1228. #define CGEMM_DEFAULT_UNROLL_N 2
  1229. #define ZGEMM_DEFAULT_UNROLL_N 2
  1230. #define XGEMM_DEFAULT_UNROLL_N 1
  1231. #else
  1232. #define SGEMM_DEFAULT_UNROLL_M 16
  1233. #define DGEMM_DEFAULT_UNROLL_M 4
  1234. #define QGEMM_DEFAULT_UNROLL_M 2
  1235. #define CGEMM_DEFAULT_UNROLL_M 8
  1236. #define ZGEMM_DEFAULT_UNROLL_M 4
  1237. #define XGEMM_DEFAULT_UNROLL_M 1
  1238. #define SGEMM_DEFAULT_UNROLL_N 4
  1239. #define DGEMM_DEFAULT_UNROLL_N 8
  1240. #define QGEMM_DEFAULT_UNROLL_N 2
  1241. #define CGEMM_DEFAULT_UNROLL_N 2
  1242. #define ZGEMM_DEFAULT_UNROLL_N 2
  1243. #define XGEMM_DEFAULT_UNROLL_N 1
  1244. #define SGEMM_DEFAULT_UNROLL_MN 32
  1245. #define DGEMM_DEFAULT_UNROLL_MN 32
  1246. #endif
  1247. #ifdef ARCH_X86
  1248. #define SGEMM_DEFAULT_P 512
  1249. #define SGEMM_DEFAULT_R sgemm_r
  1250. #define DGEMM_DEFAULT_P 512
  1251. #define DGEMM_DEFAULT_R dgemm_r
  1252. #define QGEMM_DEFAULT_P 504
  1253. #define QGEMM_DEFAULT_R qgemm_r
  1254. #define CGEMM_DEFAULT_P 128
  1255. #define CGEMM_DEFAULT_R 1024
  1256. #define ZGEMM_DEFAULT_P 512
  1257. #define ZGEMM_DEFAULT_R zgemm_r
  1258. #define XGEMM_DEFAULT_P 252
  1259. #define XGEMM_DEFAULT_R xgemm_r
  1260. #define SGEMM_DEFAULT_Q 256
  1261. #define DGEMM_DEFAULT_Q 256
  1262. #define QGEMM_DEFAULT_Q 128
  1263. #define CGEMM_DEFAULT_Q 256
  1264. #define ZGEMM_DEFAULT_Q 192
  1265. #define XGEMM_DEFAULT_Q 128
  1266. #else
  1267. #define SGEMM_DEFAULT_P 768
  1268. #define DGEMM_DEFAULT_P 512
  1269. #define CGEMM_DEFAULT_P 384
  1270. #define ZGEMM_DEFAULT_P 256
  1271. #ifdef WINDOWS_ABI
  1272. #define SGEMM_DEFAULT_Q 320
  1273. #define DGEMM_DEFAULT_Q 128
  1274. #else
  1275. #define SGEMM_DEFAULT_Q 384
  1276. #define DGEMM_DEFAULT_Q 256
  1277. #endif
  1278. #define CGEMM_DEFAULT_Q 192
  1279. #define ZGEMM_DEFAULT_Q 128
  1280. #define SGEMM_DEFAULT_R sgemm_r
  1281. #define DGEMM_DEFAULT_R 13824
  1282. #define CGEMM_DEFAULT_R cgemm_r
  1283. #define ZGEMM_DEFAULT_R zgemm_r
  1284. #define QGEMM_DEFAULT_Q 128
  1285. #define QGEMM_DEFAULT_P 504
  1286. #define QGEMM_DEFAULT_R qgemm_r
  1287. #define XGEMM_DEFAULT_P 252
  1288. #define XGEMM_DEFAULT_R xgemm_r
  1289. #define XGEMM_DEFAULT_Q 128
  1290. #define CGEMM3M_DEFAULT_UNROLL_N 8
  1291. #define CGEMM3M_DEFAULT_UNROLL_M 4
  1292. #define ZGEMM3M_DEFAULT_UNROLL_N 8
  1293. #define ZGEMM3M_DEFAULT_UNROLL_M 2
  1294. #define CGEMM3M_DEFAULT_P 448
  1295. #define ZGEMM3M_DEFAULT_P 224
  1296. #define XGEMM3M_DEFAULT_P 112
  1297. #define CGEMM3M_DEFAULT_Q 224
  1298. #define ZGEMM3M_DEFAULT_Q 224
  1299. #define XGEMM3M_DEFAULT_Q 224
  1300. #define CGEMM3M_DEFAULT_R 12288
  1301. #define ZGEMM3M_DEFAULT_R 12288
  1302. #define XGEMM3M_DEFAULT_R 12288
  1303. #endif
  1304. #endif
  1305. #ifdef SKYLAKEX
  1306. #define SNUMOPT 16
  1307. #define DNUMOPT 8
  1308. #define GEMM_DEFAULT_OFFSET_A 0
  1309. #define GEMM_DEFAULT_OFFSET_B 0
  1310. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  1311. #define SYMV_P 8
  1312. #define SWITCH_RATIO 32
  1313. #define GEMM_PREFERED_SIZE 32
  1314. #define USE_SGEMM_KERNEL_DIRECT 1
  1315. #ifdef ARCH_X86
  1316. #define SGEMM_DEFAULT_UNROLL_M 4
  1317. #define DGEMM_DEFAULT_UNROLL_M 2
  1318. #define QGEMM_DEFAULT_UNROLL_M 2
  1319. #define CGEMM_DEFAULT_UNROLL_M 2
  1320. #define ZGEMM_DEFAULT_UNROLL_M 1
  1321. #define XGEMM_DEFAULT_UNROLL_M 1
  1322. #define SGEMM_DEFAULT_UNROLL_N 4
  1323. #define DGEMM_DEFAULT_UNROLL_N 4
  1324. #define QGEMM_DEFAULT_UNROLL_N 2
  1325. #define CGEMM_DEFAULT_UNROLL_N 2
  1326. #define ZGEMM_DEFAULT_UNROLL_N 2
  1327. #define XGEMM_DEFAULT_UNROLL_N 1
  1328. #else
  1329. #define SGEMM_DEFAULT_UNROLL_M 16
  1330. #define DGEMM_DEFAULT_UNROLL_M 4
  1331. #define QGEMM_DEFAULT_UNROLL_M 2
  1332. #define CGEMM_DEFAULT_UNROLL_M 8
  1333. #define ZGEMM_DEFAULT_UNROLL_M 4
  1334. #define XGEMM_DEFAULT_UNROLL_M 1
  1335. #define SGEMM_DEFAULT_UNROLL_N 4
  1336. #define DGEMM_DEFAULT_UNROLL_N 8
  1337. #define QGEMM_DEFAULT_UNROLL_N 2
  1338. #define CGEMM_DEFAULT_UNROLL_N 2
  1339. #define ZGEMM_DEFAULT_UNROLL_N 2
  1340. #define XGEMM_DEFAULT_UNROLL_N 1
  1341. #define SGEMM_DEFAULT_UNROLL_MN 32
  1342. #define DGEMM_DEFAULT_UNROLL_MN 32
  1343. #endif
  1344. #ifdef ARCH_X86
  1345. #define SGEMM_DEFAULT_P 512
  1346. #define SGEMM_DEFAULT_R sgemm_r
  1347. #define DGEMM_DEFAULT_P 512
  1348. #define DGEMM_DEFAULT_R dgemm_r
  1349. #define QGEMM_DEFAULT_P 504
  1350. #define QGEMM_DEFAULT_R qgemm_r
  1351. #define CGEMM_DEFAULT_P 128
  1352. #define CGEMM_DEFAULT_R 1024
  1353. #define ZGEMM_DEFAULT_P 512
  1354. #define ZGEMM_DEFAULT_R zgemm_r
  1355. #define XGEMM_DEFAULT_P 252
  1356. #define XGEMM_DEFAULT_R xgemm_r
  1357. #define SGEMM_DEFAULT_Q 256
  1358. #define DGEMM_DEFAULT_Q 256
  1359. #define QGEMM_DEFAULT_Q 128
  1360. #define CGEMM_DEFAULT_Q 256
  1361. #define ZGEMM_DEFAULT_Q 192
  1362. #define XGEMM_DEFAULT_Q 128
  1363. #else
  1364. #define SGEMM_DEFAULT_P 768
  1365. #define DGEMM_DEFAULT_P 512
  1366. #define CGEMM_DEFAULT_P 384
  1367. #define ZGEMM_DEFAULT_P 256
  1368. #ifdef WINDOWS_ABI
  1369. #define SGEMM_DEFAULT_Q 320
  1370. #define DGEMM_DEFAULT_Q 128
  1371. #else
  1372. #define SGEMM_DEFAULT_Q 384
  1373. #define DGEMM_DEFAULT_Q 256
  1374. #endif
  1375. #define CGEMM_DEFAULT_Q 192
  1376. #define ZGEMM_DEFAULT_Q 128
  1377. #define SGEMM_DEFAULT_R sgemm_r
  1378. #define DGEMM_DEFAULT_R 13824
  1379. #define CGEMM_DEFAULT_R cgemm_r
  1380. #define ZGEMM_DEFAULT_R zgemm_r
  1381. #define QGEMM_DEFAULT_Q 128
  1382. #define QGEMM_DEFAULT_P 504
  1383. #define QGEMM_DEFAULT_R qgemm_r
  1384. #define XGEMM_DEFAULT_P 252
  1385. #define XGEMM_DEFAULT_R xgemm_r
  1386. #define XGEMM_DEFAULT_Q 128
  1387. #define CGEMM3M_DEFAULT_UNROLL_N 8
  1388. #define CGEMM3M_DEFAULT_UNROLL_M 4
  1389. #define ZGEMM3M_DEFAULT_UNROLL_N 8
  1390. #define ZGEMM3M_DEFAULT_UNROLL_M 2
  1391. #define CGEMM3M_DEFAULT_P 448
  1392. #define ZGEMM3M_DEFAULT_P 224
  1393. #define XGEMM3M_DEFAULT_P 112
  1394. #define CGEMM3M_DEFAULT_Q 224
  1395. #define ZGEMM3M_DEFAULT_Q 224
  1396. #define XGEMM3M_DEFAULT_Q 224
  1397. #define CGEMM3M_DEFAULT_R 12288
  1398. #define ZGEMM3M_DEFAULT_R 12288
  1399. #define XGEMM3M_DEFAULT_R 12288
  1400. #endif
  1401. #endif
  1402. #ifdef ATOM
  1403. #define SNUMOPT 2
  1404. #define DNUMOPT 1
  1405. #define GEMM_DEFAULT_OFFSET_A 64
  1406. #define GEMM_DEFAULT_OFFSET_B 0
  1407. #define GEMM_DEFAULT_ALIGN 0x0ffffUL
  1408. #define SYMV_P 8
  1409. #ifdef ARCH_X86
  1410. #define SGEMM_DEFAULT_UNROLL_M 4
  1411. #define DGEMM_DEFAULT_UNROLL_M 2
  1412. #define QGEMM_DEFAULT_UNROLL_M 2
  1413. #define CGEMM_DEFAULT_UNROLL_M 2
  1414. #define ZGEMM_DEFAULT_UNROLL_M 1
  1415. #define XGEMM_DEFAULT_UNROLL_M 1
  1416. #else
  1417. #define SGEMM_DEFAULT_UNROLL_M 8
  1418. #define DGEMM_DEFAULT_UNROLL_M 4
  1419. #define QGEMM_DEFAULT_UNROLL_M 2
  1420. #define CGEMM_DEFAULT_UNROLL_M 4
  1421. #define ZGEMM_DEFAULT_UNROLL_M 2
  1422. #define XGEMM_DEFAULT_UNROLL_M 1
  1423. #endif
  1424. #define SGEMM_DEFAULT_UNROLL_N 4
  1425. #define DGEMM_DEFAULT_UNROLL_N 2
  1426. #define QGEMM_DEFAULT_UNROLL_N 2
  1427. #define CGEMM_DEFAULT_UNROLL_N 2
  1428. #define ZGEMM_DEFAULT_UNROLL_N 1
  1429. #define XGEMM_DEFAULT_UNROLL_N 1
  1430. #define SGEMM_DEFAULT_P sgemm_p
  1431. #define SGEMM_DEFAULT_R sgemm_r
  1432. #define DGEMM_DEFAULT_P dgemm_p
  1433. #define DGEMM_DEFAULT_R dgemm_r
  1434. #define QGEMM_DEFAULT_P qgemm_p
  1435. #define QGEMM_DEFAULT_R qgemm_r
  1436. #define CGEMM_DEFAULT_P cgemm_p
  1437. #define CGEMM_DEFAULT_R cgemm_r
  1438. #define ZGEMM_DEFAULT_P zgemm_p
  1439. #define ZGEMM_DEFAULT_R zgemm_r
  1440. #define XGEMM_DEFAULT_P xgemm_p
  1441. #define XGEMM_DEFAULT_R xgemm_r
  1442. #define SGEMM_DEFAULT_Q 256
  1443. #define DGEMM_DEFAULT_Q 256
  1444. #define QGEMM_DEFAULT_Q 256
  1445. #define CGEMM_DEFAULT_Q 256
  1446. #define ZGEMM_DEFAULT_Q 256
  1447. #define XGEMM_DEFAULT_Q 256
  1448. #endif
  1449. #ifdef ITANIUM2
  1450. #define SNUMOPT 4
  1451. #define DNUMOPT 4
  1452. #define GEMM_DEFAULT_OFFSET_A 0
  1453. #define GEMM_DEFAULT_OFFSET_B 128
  1454. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  1455. #define SGEMM_DEFAULT_UNROLL_M 8
  1456. #define SGEMM_DEFAULT_UNROLL_N 8
  1457. #define DGEMM_DEFAULT_UNROLL_M 8
  1458. #define DGEMM_DEFAULT_UNROLL_N 8
  1459. #define QGEMM_DEFAULT_UNROLL_M 8
  1460. #define QGEMM_DEFAULT_UNROLL_N 8
  1461. #define CGEMM_DEFAULT_UNROLL_M 4
  1462. #define CGEMM_DEFAULT_UNROLL_N 4
  1463. #define ZGEMM_DEFAULT_UNROLL_M 4
  1464. #define ZGEMM_DEFAULT_UNROLL_N 4
  1465. #define XGEMM_DEFAULT_UNROLL_M 4
  1466. #define XGEMM_DEFAULT_UNROLL_N 4
  1467. #define SGEMM_DEFAULT_P sgemm_p
  1468. #define DGEMM_DEFAULT_P dgemm_p
  1469. #define QGEMM_DEFAULT_P qgemm_p
  1470. #define CGEMM_DEFAULT_P cgemm_p
  1471. #define ZGEMM_DEFAULT_P zgemm_p
  1472. #define XGEMM_DEFAULT_P xgemm_p
  1473. #define SGEMM_DEFAULT_Q 1024
  1474. #define DGEMM_DEFAULT_Q 1024
  1475. #define QGEMM_DEFAULT_Q 1024
  1476. #define CGEMM_DEFAULT_Q 1024
  1477. #define ZGEMM_DEFAULT_Q 1024
  1478. #define XGEMM_DEFAULT_Q 1024
  1479. #define SGEMM_DEFAULT_R sgemm_r
  1480. #define DGEMM_DEFAULT_R dgemm_r
  1481. #define QGEMM_DEFAULT_R qgemm_r
  1482. #define CGEMM_DEFAULT_R cgemm_r
  1483. #define ZGEMM_DEFAULT_R zgemm_r
  1484. #define XGEMM_DEFAULT_R xgemm_r
  1485. #define SYMV_P 16
  1486. #define GETRF_FACTOR 0.65
  1487. #endif
  1488. #if defined(EV4) || defined(EV5) || defined(EV6)
  1489. #ifdef EV4
  1490. #define SNUMOPT 1
  1491. #define DNUMOPT 1
  1492. #else
  1493. #define SNUMOPT 2
  1494. #define DNUMOPT 2
  1495. #endif
  1496. #define GEMM_DEFAULT_OFFSET_A 512
  1497. #define GEMM_DEFAULT_OFFSET_B 512
  1498. #define GEMM_DEFAULT_ALIGN 0x0ffffUL
  1499. #define SGEMM_DEFAULT_UNROLL_M 4
  1500. #define SGEMM_DEFAULT_UNROLL_N 4
  1501. #define DGEMM_DEFAULT_UNROLL_M 4
  1502. #define DGEMM_DEFAULT_UNROLL_N 4
  1503. #define CGEMM_DEFAULT_UNROLL_M 2
  1504. #define CGEMM_DEFAULT_UNROLL_N 2
  1505. #define ZGEMM_DEFAULT_UNROLL_M 2
  1506. #define ZGEMM_DEFAULT_UNROLL_N 2
  1507. #define SYMV_P 8
  1508. #ifdef EV4
  1509. #define SGEMM_DEFAULT_P 32
  1510. #define SGEMM_DEFAULT_Q 112
  1511. #define SGEMM_DEFAULT_R 256
  1512. #define DGEMM_DEFAULT_P 32
  1513. #define DGEMM_DEFAULT_Q 56
  1514. #define DGEMM_DEFAULT_R 256
  1515. #define CGEMM_DEFAULT_P 32
  1516. #define CGEMM_DEFAULT_Q 64
  1517. #define CGEMM_DEFAULT_R 240
  1518. #define ZGEMM_DEFAULT_P 32
  1519. #define ZGEMM_DEFAULT_Q 32
  1520. #define ZGEMM_DEFAULT_R 240
  1521. #endif
  1522. #ifdef EV5
  1523. #define SGEMM_DEFAULT_P 64
  1524. #define SGEMM_DEFAULT_Q 256
  1525. #define DGEMM_DEFAULT_P 64
  1526. #define DGEMM_DEFAULT_Q 128
  1527. #define CGEMM_DEFAULT_P 64
  1528. #define CGEMM_DEFAULT_Q 128
  1529. #define ZGEMM_DEFAULT_P 64
  1530. #define ZGEMM_DEFAULT_Q 64
  1531. #endif
  1532. #ifdef EV6
  1533. #define SGEMM_DEFAULT_P 256
  1534. #define SGEMM_DEFAULT_Q 512
  1535. #define DGEMM_DEFAULT_P 256
  1536. #define DGEMM_DEFAULT_Q 256
  1537. #define CGEMM_DEFAULT_P 256
  1538. #define CGEMM_DEFAULT_Q 256
  1539. #define ZGEMM_DEFAULT_P 128
  1540. #define ZGEMM_DEFAULT_Q 256
  1541. #endif
  1542. #endif
  1543. #ifdef CELL
  1544. #define SNUMOPT 2
  1545. #define DNUMOPT 2
  1546. #define GEMM_DEFAULT_OFFSET_A 0
  1547. #define GEMM_DEFAULT_OFFSET_B 8192
  1548. #define GEMM_DEFAULT_ALIGN 0x0ffffUL
  1549. #define SGEMM_DEFAULT_UNROLL_M 16
  1550. #define SGEMM_DEFAULT_UNROLL_N 4
  1551. #define DGEMM_DEFAULT_UNROLL_M 4
  1552. #define DGEMM_DEFAULT_UNROLL_N 4
  1553. #define CGEMM_DEFAULT_UNROLL_M 8
  1554. #define CGEMM_DEFAULT_UNROLL_N 2
  1555. #define ZGEMM_DEFAULT_UNROLL_M 2
  1556. #define ZGEMM_DEFAULT_UNROLL_N 2
  1557. #define SGEMM_DEFAULT_P 128
  1558. #define DGEMM_DEFAULT_P 128
  1559. #define CGEMM_DEFAULT_P 128
  1560. #define ZGEMM_DEFAULT_P 128
  1561. #define SGEMM_DEFAULT_Q 512
  1562. #define DGEMM_DEFAULT_Q 256
  1563. #define CGEMM_DEFAULT_Q 256
  1564. #define ZGEMM_DEFAULT_Q 128
  1565. #define SYMV_P 4
  1566. #endif
  1567. #ifdef PPCG4
  1568. #define GEMM_DEFAULT_OFFSET_A 0
  1569. #define GEMM_DEFAULT_OFFSET_B 1024
  1570. #define GEMM_DEFAULT_ALIGN 0x0ffffUL
  1571. #define SGEMM_DEFAULT_UNROLL_M 16
  1572. #define SGEMM_DEFAULT_UNROLL_N 4
  1573. #define DGEMM_DEFAULT_UNROLL_M 4
  1574. #define DGEMM_DEFAULT_UNROLL_N 4
  1575. #define CGEMM_DEFAULT_UNROLL_M 8
  1576. #define CGEMM_DEFAULT_UNROLL_N 2
  1577. #define ZGEMM_DEFAULT_UNROLL_M 2
  1578. #define ZGEMM_DEFAULT_UNROLL_N 2
  1579. #define SGEMM_DEFAULT_P 256
  1580. #define DGEMM_DEFAULT_P 128
  1581. #define CGEMM_DEFAULT_P 128
  1582. #define ZGEMM_DEFAULT_P 64
  1583. #define SGEMM_DEFAULT_Q 256
  1584. #define DGEMM_DEFAULT_Q 256
  1585. #define CGEMM_DEFAULT_Q 256
  1586. #define ZGEMM_DEFAULT_Q 256
  1587. #define SYMV_P 4
  1588. #endif
  1589. #ifdef PPC970
  1590. #define SNUMOPT 4
  1591. #define DNUMOPT 4
  1592. #define GEMM_DEFAULT_OFFSET_A 2688
  1593. #define GEMM_DEFAULT_OFFSET_B 3072
  1594. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  1595. #define SGEMM_DEFAULT_UNROLL_M 16
  1596. #define SGEMM_DEFAULT_UNROLL_N 4
  1597. #define DGEMM_DEFAULT_UNROLL_M 4
  1598. #define DGEMM_DEFAULT_UNROLL_N 4
  1599. #define CGEMM_DEFAULT_UNROLL_M 8
  1600. #define CGEMM_DEFAULT_UNROLL_N 2
  1601. #define ZGEMM_DEFAULT_UNROLL_M 2
  1602. #define ZGEMM_DEFAULT_UNROLL_N 2
  1603. #ifdef OS_LINUX
  1604. #if L2_SIZE == 1024976
  1605. #define SGEMM_DEFAULT_P 320
  1606. #define DGEMM_DEFAULT_P 256
  1607. #define CGEMM_DEFAULT_P 256
  1608. #define ZGEMM_DEFAULT_P 256
  1609. #else
  1610. #define SGEMM_DEFAULT_P 176
  1611. #define DGEMM_DEFAULT_P 176
  1612. #define CGEMM_DEFAULT_P 176
  1613. #define ZGEMM_DEFAULT_P 176
  1614. #endif
  1615. #endif
  1616. #define SGEMM_DEFAULT_Q 512
  1617. #define DGEMM_DEFAULT_Q 256
  1618. #define CGEMM_DEFAULT_Q 256
  1619. #define ZGEMM_DEFAULT_Q 128
  1620. #define SYMV_P 4
  1621. #endif
  1622. #ifdef PPC440
  1623. #define SNUMOPT 2
  1624. #define DNUMOPT 2
  1625. #define GEMM_DEFAULT_OFFSET_A (32 * 0)
  1626. #define GEMM_DEFAULT_OFFSET_B (32 * 0)
  1627. #define GEMM_DEFAULT_ALIGN 0x0ffffUL
  1628. #define SGEMM_DEFAULT_UNROLL_M 4
  1629. #define SGEMM_DEFAULT_UNROLL_N 4
  1630. #define DGEMM_DEFAULT_UNROLL_M 4
  1631. #define DGEMM_DEFAULT_UNROLL_N 4
  1632. #define CGEMM_DEFAULT_UNROLL_M 2
  1633. #define CGEMM_DEFAULT_UNROLL_N 2
  1634. #define ZGEMM_DEFAULT_UNROLL_M 2
  1635. #define ZGEMM_DEFAULT_UNROLL_N 2
  1636. #define SGEMM_DEFAULT_P 512
  1637. #define DGEMM_DEFAULT_P 512
  1638. #define CGEMM_DEFAULT_P 512
  1639. #define ZGEMM_DEFAULT_P 512
  1640. #define SGEMM_DEFAULT_Q 1024
  1641. #define DGEMM_DEFAULT_Q 512
  1642. #define CGEMM_DEFAULT_Q 512
  1643. #define ZGEMM_DEFAULT_Q 256
  1644. #define SGEMM_DEFAULT_R SGEMM_DEFAULT_P
  1645. #define DGEMM_DEFAULT_R DGEMM_DEFAULT_P
  1646. #define CGEMM_DEFAULT_R CGEMM_DEFAULT_P
  1647. #define ZGEMM_DEFAULT_R ZGEMM_DEFAULT_P
  1648. #define SYMV_P 4
  1649. #endif
  1650. #ifdef PPC440FP2
  1651. #define SNUMOPT 4
  1652. #define DNUMOPT 4
  1653. #define GEMM_DEFAULT_OFFSET_A (32 * 0)
  1654. #define GEMM_DEFAULT_OFFSET_B (32 * 0)
  1655. #define GEMM_DEFAULT_ALIGN 0x0ffffUL
  1656. #define SGEMM_DEFAULT_UNROLL_M 8
  1657. #define SGEMM_DEFAULT_UNROLL_N 4
  1658. #define DGEMM_DEFAULT_UNROLL_M 8
  1659. #define DGEMM_DEFAULT_UNROLL_N 4
  1660. #define CGEMM_DEFAULT_UNROLL_M 4
  1661. #define CGEMM_DEFAULT_UNROLL_N 2
  1662. #define ZGEMM_DEFAULT_UNROLL_M 4
  1663. #define ZGEMM_DEFAULT_UNROLL_N 2
  1664. #define SGEMM_DEFAULT_P 128
  1665. #define DGEMM_DEFAULT_P 128
  1666. #define CGEMM_DEFAULT_P 128
  1667. #define ZGEMM_DEFAULT_P 128
  1668. #if 1
  1669. #define SGEMM_DEFAULT_Q 4096
  1670. #define DGEMM_DEFAULT_Q 3072
  1671. #define CGEMM_DEFAULT_Q 2048
  1672. #define ZGEMM_DEFAULT_Q 1024
  1673. #else
  1674. #define SGEMM_DEFAULT_Q 512
  1675. #define DGEMM_DEFAULT_Q 256
  1676. #define CGEMM_DEFAULT_Q 256
  1677. #define ZGEMM_DEFAULT_Q 128
  1678. #endif
  1679. #define SYMV_P 4
  1680. #endif
  1681. #if defined(POWER3) || defined(POWER4) || defined(POWER5)
  1682. #define GEMM_DEFAULT_OFFSET_A 0
  1683. #define GEMM_DEFAULT_OFFSET_B 2048
  1684. #define GEMM_DEFAULT_ALIGN 0x0ffffUL
  1685. #define SGEMM_DEFAULT_UNROLL_M 4
  1686. #define SGEMM_DEFAULT_UNROLL_N 4
  1687. #define DGEMM_DEFAULT_UNROLL_M 4
  1688. #define DGEMM_DEFAULT_UNROLL_N 4
  1689. #define CGEMM_DEFAULT_UNROLL_M 2
  1690. #define CGEMM_DEFAULT_UNROLL_N 2
  1691. #define ZGEMM_DEFAULT_UNROLL_M 2
  1692. #define ZGEMM_DEFAULT_UNROLL_N 2
  1693. #ifdef POWER3
  1694. #define SNUMOPT 4
  1695. #define DNUMOPT 4
  1696. #define SGEMM_DEFAULT_P 256
  1697. #define SGEMM_DEFAULT_Q 432
  1698. #define SGEMM_DEFAULT_R 1012
  1699. #define DGEMM_DEFAULT_P 256
  1700. #define DGEMM_DEFAULT_Q 216
  1701. #define DGEMM_DEFAULT_R 1012
  1702. #define ZGEMM_DEFAULT_P 256
  1703. #define ZGEMM_DEFAULT_Q 104
  1704. #define ZGEMM_DEFAULT_R 1012
  1705. #endif
  1706. #if defined(POWER4)
  1707. #ifdef ALLOC_HUGETLB
  1708. #define SGEMM_DEFAULT_P 184
  1709. #define DGEMM_DEFAULT_P 184
  1710. #define CGEMM_DEFAULT_P 184
  1711. #define ZGEMM_DEFAULT_P 184
  1712. #else
  1713. #define SGEMM_DEFAULT_P 144
  1714. #define DGEMM_DEFAULT_P 144
  1715. #define CGEMM_DEFAULT_P 144
  1716. #define ZGEMM_DEFAULT_P 144
  1717. #endif
  1718. #endif
  1719. #if defined(POWER5)
  1720. #ifdef ALLOC_HUGETLB
  1721. #define SGEMM_DEFAULT_P 512
  1722. #define DGEMM_DEFAULT_P 256
  1723. #define CGEMM_DEFAULT_P 256
  1724. #define ZGEMM_DEFAULT_P 128
  1725. #else
  1726. #define SGEMM_DEFAULT_P 320
  1727. #define DGEMM_DEFAULT_P 160
  1728. #define CGEMM_DEFAULT_P 160
  1729. #define ZGEMM_DEFAULT_P 80
  1730. #endif
  1731. #define SGEMM_DEFAULT_Q 256
  1732. #define CGEMM_DEFAULT_Q 256
  1733. #define DGEMM_DEFAULT_Q 256
  1734. #define ZGEMM_DEFAULT_Q 256
  1735. #endif
  1736. #define SYMV_P 8
  1737. #endif
  1738. #if defined(POWER6)
  1739. #define SNUMOPT 4
  1740. #define DNUMOPT 4
  1741. #define GEMM_DEFAULT_OFFSET_A 384
  1742. #define GEMM_DEFAULT_OFFSET_B 1024
  1743. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  1744. #define SGEMM_DEFAULT_UNROLL_M 4
  1745. #define SGEMM_DEFAULT_UNROLL_N 4
  1746. #define DGEMM_DEFAULT_UNROLL_M 4
  1747. #define DGEMM_DEFAULT_UNROLL_N 4
  1748. #define CGEMM_DEFAULT_UNROLL_M 2
  1749. #define CGEMM_DEFAULT_UNROLL_N 4
  1750. #define ZGEMM_DEFAULT_UNROLL_M 2
  1751. #define ZGEMM_DEFAULT_UNROLL_N 4
  1752. #define SGEMM_DEFAULT_P 992
  1753. #define DGEMM_DEFAULT_P 480
  1754. #define CGEMM_DEFAULT_P 488
  1755. #define ZGEMM_DEFAULT_P 248
  1756. #define SGEMM_DEFAULT_Q 504
  1757. #define DGEMM_DEFAULT_Q 504
  1758. #define CGEMM_DEFAULT_Q 400
  1759. #define ZGEMM_DEFAULT_Q 400
  1760. #define SYMV_P 8
  1761. #endif
  1762. #if defined(POWER8)
  1763. #define SNUMOPT 16
  1764. #define DNUMOPT 8
  1765. #define GEMM_DEFAULT_OFFSET_A 0
  1766. #define GEMM_DEFAULT_OFFSET_B 65536
  1767. #define GEMM_DEFAULT_ALIGN 0x0ffffUL
  1768. #define SGEMM_DEFAULT_UNROLL_M 16
  1769. #define SGEMM_DEFAULT_UNROLL_N 8
  1770. #define DGEMM_DEFAULT_UNROLL_M 16
  1771. #define DGEMM_DEFAULT_UNROLL_N 4
  1772. #define CGEMM_DEFAULT_UNROLL_M 8
  1773. #define CGEMM_DEFAULT_UNROLL_N 4
  1774. #define ZGEMM_DEFAULT_UNROLL_M 8
  1775. #define ZGEMM_DEFAULT_UNROLL_N 2
  1776. #define SGEMM_DEFAULT_P 1280
  1777. #define DGEMM_DEFAULT_P 640
  1778. #define CGEMM_DEFAULT_P 640
  1779. #define ZGEMM_DEFAULT_P 320
  1780. #define SGEMM_DEFAULT_Q 640
  1781. #define DGEMM_DEFAULT_Q 720
  1782. #define CGEMM_DEFAULT_Q 640
  1783. #define ZGEMM_DEFAULT_Q 640
  1784. #define SYMV_P 8
  1785. #endif
  1786. #if defined(SPARC) && defined(V7)
  1787. #define SNUMOPT 4
  1788. #define DNUMOPT 4
  1789. #define GEMM_DEFAULT_OFFSET_A 0
  1790. #define GEMM_DEFAULT_OFFSET_B 2048
  1791. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  1792. #define SGEMM_DEFAULT_UNROLL_M 2
  1793. #define SGEMM_DEFAULT_UNROLL_N 8
  1794. #define DGEMM_DEFAULT_UNROLL_M 2
  1795. #define DGEMM_DEFAULT_UNROLL_N 8
  1796. #define CGEMM_DEFAULT_UNROLL_M 1
  1797. #define CGEMM_DEFAULT_UNROLL_N 4
  1798. #define ZGEMM_DEFAULT_UNROLL_M 1
  1799. #define ZGEMM_DEFAULT_UNROLL_N 4
  1800. #define SGEMM_DEFAULT_P 256
  1801. #define DGEMM_DEFAULT_P 256
  1802. #define CGEMM_DEFAULT_P 256
  1803. #define ZGEMM_DEFAULT_P 256
  1804. #define SGEMM_DEFAULT_Q 512
  1805. #define DGEMM_DEFAULT_Q 256
  1806. #define CGEMM_DEFAULT_Q 256
  1807. #define ZGEMM_DEFAULT_Q 128
  1808. #define SYMV_P 8
  1809. #define GEMM_THREAD gemm_thread_mn
  1810. #endif
  1811. #if (defined(SPARC) && defined(V9)) || defined(__sparc_v9__)
  1812. #define SNUMOPT 2
  1813. #define DNUMOPT 2
  1814. #define GEMM_DEFAULT_OFFSET_A 0
  1815. #define GEMM_DEFAULT_OFFSET_B 2048
  1816. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  1817. #define SGEMM_DEFAULT_UNROLL_M 4
  1818. #define SGEMM_DEFAULT_UNROLL_N 4
  1819. #define DGEMM_DEFAULT_UNROLL_M 4
  1820. #define DGEMM_DEFAULT_UNROLL_N 4
  1821. #define CGEMM_DEFAULT_UNROLL_M 2
  1822. #define CGEMM_DEFAULT_UNROLL_N 2
  1823. #define ZGEMM_DEFAULT_UNROLL_M 2
  1824. #define ZGEMM_DEFAULT_UNROLL_N 2
  1825. #define SGEMM_DEFAULT_P 512
  1826. #define DGEMM_DEFAULT_P 512
  1827. #define CGEMM_DEFAULT_P 512
  1828. #define ZGEMM_DEFAULT_P 512
  1829. #define SGEMM_DEFAULT_Q 1024
  1830. #define DGEMM_DEFAULT_Q 512
  1831. #define CGEMM_DEFAULT_Q 512
  1832. #define ZGEMM_DEFAULT_Q 256
  1833. #define SYMV_P 8
  1834. #endif
  1835. #ifdef SICORTEX
  1836. #define SNUMOPT 2
  1837. #define DNUMOPT 2
  1838. #define GEMM_DEFAULT_OFFSET_A 0
  1839. #define GEMM_DEFAULT_OFFSET_B 0
  1840. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  1841. #define SGEMM_DEFAULT_UNROLL_M 2
  1842. #define SGEMM_DEFAULT_UNROLL_N 8
  1843. #define DGEMM_DEFAULT_UNROLL_M 2
  1844. #define DGEMM_DEFAULT_UNROLL_N 8
  1845. #define CGEMM_DEFAULT_UNROLL_M 1
  1846. #define CGEMM_DEFAULT_UNROLL_N 4
  1847. #define ZGEMM_DEFAULT_UNROLL_M 1
  1848. #define ZGEMM_DEFAULT_UNROLL_N 4
  1849. #define SGEMM_DEFAULT_P 108
  1850. #define DGEMM_DEFAULT_P 112
  1851. #define CGEMM_DEFAULT_P 108
  1852. #define ZGEMM_DEFAULT_P 112
  1853. #define SGEMM_DEFAULT_Q 288
  1854. #define DGEMM_DEFAULT_Q 144
  1855. #define CGEMM_DEFAULT_Q 144
  1856. #define ZGEMM_DEFAULT_Q 72
  1857. #define SGEMM_DEFAULT_R 2000
  1858. #define DGEMM_DEFAULT_R 2000
  1859. #define CGEMM_DEFAULT_R 2000
  1860. #define ZGEMM_DEFAULT_R 2000
  1861. #define SYMV_P 16
  1862. #endif
  1863. #ifdef LOONGSON3A
  1864. ////Copy from SICORTEX
  1865. #define SNUMOPT 2
  1866. #define DNUMOPT 2
  1867. #define GEMM_DEFAULT_OFFSET_A 0
  1868. #define GEMM_DEFAULT_OFFSET_B 0
  1869. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  1870. #define SGEMM_DEFAULT_UNROLL_M 8
  1871. #define SGEMM_DEFAULT_UNROLL_N 4
  1872. #define DGEMM_DEFAULT_UNROLL_M 4
  1873. #define DGEMM_DEFAULT_UNROLL_N 4
  1874. #define CGEMM_DEFAULT_UNROLL_M 4
  1875. #define CGEMM_DEFAULT_UNROLL_N 2
  1876. #define ZGEMM_DEFAULT_UNROLL_M 2
  1877. #define ZGEMM_DEFAULT_UNROLL_N 2
  1878. #define SGEMM_DEFAULT_P 64
  1879. #define DGEMM_DEFAULT_P 44
  1880. #define CGEMM_DEFAULT_P 64
  1881. #define ZGEMM_DEFAULT_P 32
  1882. #define SGEMM_DEFAULT_Q 192
  1883. #define DGEMM_DEFAULT_Q 92
  1884. #define CGEMM_DEFAULT_Q 128
  1885. #define ZGEMM_DEFAULT_Q 80
  1886. #define SGEMM_DEFAULT_R 640
  1887. #define DGEMM_DEFAULT_R dgemm_r
  1888. #define CGEMM_DEFAULT_R 640
  1889. #define ZGEMM_DEFAULT_R 640
  1890. #define GEMM_OFFSET_A1 0x10000
  1891. #define GEMM_OFFSET_B1 0x100000
  1892. #define SYMV_P 16
  1893. #endif
  1894. #ifdef LOONGSON3B
  1895. #define SNUMOPT 2
  1896. #define DNUMOPT 2
  1897. #define GEMM_DEFAULT_OFFSET_A 0
  1898. #define GEMM_DEFAULT_OFFSET_B 0
  1899. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  1900. #define SGEMM_DEFAULT_UNROLL_M 2
  1901. #define SGEMM_DEFAULT_UNROLL_N 2
  1902. #define DGEMM_DEFAULT_UNROLL_M 2
  1903. #define DGEMM_DEFAULT_UNROLL_N 2
  1904. #define CGEMM_DEFAULT_UNROLL_M 2
  1905. #define CGEMM_DEFAULT_UNROLL_N 2
  1906. #define ZGEMM_DEFAULT_UNROLL_M 2
  1907. #define ZGEMM_DEFAULT_UNROLL_N 2
  1908. #define SGEMM_DEFAULT_P 64
  1909. #define DGEMM_DEFAULT_P 24
  1910. #define CGEMM_DEFAULT_P 24
  1911. #define ZGEMM_DEFAULT_P 20
  1912. #define SGEMM_DEFAULT_Q 192
  1913. #define DGEMM_DEFAULT_Q 128
  1914. #define CGEMM_DEFAULT_Q 128
  1915. #define ZGEMM_DEFAULT_Q 64
  1916. #define SGEMM_DEFAULT_R 512
  1917. #define DGEMM_DEFAULT_R 512
  1918. #define CGEMM_DEFAULT_R 512
  1919. #define ZGEMM_DEFAULT_R 512
  1920. #define GEMM_OFFSET_A1 0x10000
  1921. #define GEMM_OFFSET_B1 0x100000
  1922. #define SYMV_P 16
  1923. #endif
  1924. #if defined(P5600) || defined(MIPS1004K) || defined(I6400) || defined(P6600) || defined(I6500)
  1925. #define SNUMOPT 2
  1926. #define DNUMOPT 2
  1927. #define GEMM_DEFAULT_OFFSET_A 0
  1928. #define GEMM_DEFAULT_OFFSET_B 0
  1929. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  1930. #ifdef HAVE_MSA
  1931. #define SGEMM_DEFAULT_UNROLL_M 8
  1932. #define SGEMM_DEFAULT_UNROLL_N 8
  1933. #define DGEMM_DEFAULT_UNROLL_M 8
  1934. #define DGEMM_DEFAULT_UNROLL_N 4
  1935. #define CGEMM_DEFAULT_UNROLL_M 8
  1936. #define CGEMM_DEFAULT_UNROLL_N 4
  1937. #define ZGEMM_DEFAULT_UNROLL_M 4
  1938. #define ZGEMM_DEFAULT_UNROLL_N 4
  1939. #else
  1940. #define SGEMM_DEFAULT_UNROLL_M 2
  1941. #define SGEMM_DEFAULT_UNROLL_N 2
  1942. #define DGEMM_DEFAULT_UNROLL_M 2
  1943. #define DGEMM_DEFAULT_UNROLL_N 2
  1944. #define CGEMM_DEFAULT_UNROLL_M 2
  1945. #define CGEMM_DEFAULT_UNROLL_N 2
  1946. #define ZGEMM_DEFAULT_UNROLL_M 2
  1947. #define ZGEMM_DEFAULT_UNROLL_N 2
  1948. #endif
  1949. #define SGEMM_DEFAULT_P 128
  1950. #define DGEMM_DEFAULT_P 128
  1951. #define CGEMM_DEFAULT_P 96
  1952. #define ZGEMM_DEFAULT_P 64
  1953. #define SGEMM_DEFAULT_Q 240
  1954. #define DGEMM_DEFAULT_Q 120
  1955. #define CGEMM_DEFAULT_Q 120
  1956. #define ZGEMM_DEFAULT_Q 120
  1957. #define SGEMM_DEFAULT_R 12288
  1958. #define DGEMM_DEFAULT_R 8192
  1959. #define CGEMM_DEFAULT_R 4096
  1960. #define ZGEMM_DEFAULT_R 4096
  1961. #define SYMV_P 16
  1962. #endif
  1963. #ifdef ARMV7
  1964. #define SNUMOPT 2
  1965. #define DNUMOPT 2
  1966. #define GEMM_DEFAULT_OFFSET_A 0
  1967. #define GEMM_DEFAULT_OFFSET_B 0
  1968. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  1969. #define SGEMM_DEFAULT_UNROLL_M 4
  1970. #define SGEMM_DEFAULT_UNROLL_N 4
  1971. #define DGEMM_DEFAULT_UNROLL_M 4
  1972. #define DGEMM_DEFAULT_UNROLL_N 4
  1973. #define CGEMM_DEFAULT_UNROLL_M 2
  1974. #define CGEMM_DEFAULT_UNROLL_N 2
  1975. #define ZGEMM_DEFAULT_UNROLL_M 2
  1976. #define ZGEMM_DEFAULT_UNROLL_N 2
  1977. #define SGEMM_DEFAULT_P 128
  1978. #define DGEMM_DEFAULT_P 128
  1979. #define CGEMM_DEFAULT_P 96
  1980. #define ZGEMM_DEFAULT_P 64
  1981. #define SGEMM_DEFAULT_Q 240
  1982. #define DGEMM_DEFAULT_Q 120
  1983. #define CGEMM_DEFAULT_Q 120
  1984. #define ZGEMM_DEFAULT_Q 120
  1985. #define SGEMM_DEFAULT_R 12288
  1986. #define DGEMM_DEFAULT_R 8192
  1987. #define CGEMM_DEFAULT_R 4096
  1988. #define ZGEMM_DEFAULT_R 4096
  1989. #define SYMV_P 16
  1990. #endif
  1991. #if defined(ARMV6)
  1992. #define SNUMOPT 2
  1993. #define DNUMOPT 2
  1994. #define GEMM_DEFAULT_OFFSET_A 0
  1995. #define GEMM_DEFAULT_OFFSET_B 0
  1996. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  1997. #define SGEMM_DEFAULT_UNROLL_M 4
  1998. #define SGEMM_DEFAULT_UNROLL_N 2
  1999. #define DGEMM_DEFAULT_UNROLL_M 4
  2000. #define DGEMM_DEFAULT_UNROLL_N 2
  2001. #define CGEMM_DEFAULT_UNROLL_M 2
  2002. #define CGEMM_DEFAULT_UNROLL_N 2
  2003. #define ZGEMM_DEFAULT_UNROLL_M 2
  2004. #define ZGEMM_DEFAULT_UNROLL_N 2
  2005. #define SGEMM_DEFAULT_P 128
  2006. #define DGEMM_DEFAULT_P 128
  2007. #define CGEMM_DEFAULT_P 96
  2008. #define ZGEMM_DEFAULT_P 64
  2009. #define SGEMM_DEFAULT_Q 240
  2010. #define DGEMM_DEFAULT_Q 120
  2011. #define CGEMM_DEFAULT_Q 120
  2012. #define ZGEMM_DEFAULT_Q 120
  2013. #define SGEMM_DEFAULT_R 12288
  2014. #define DGEMM_DEFAULT_R 8192
  2015. #define CGEMM_DEFAULT_R 4096
  2016. #define ZGEMM_DEFAULT_R 4096
  2017. #define SYMV_P 16
  2018. #endif
  2019. // Common ARMv8 parameters
  2020. #if defined(ARMV8)
  2021. #define SNUMOPT 2
  2022. #define DNUMOPT 2
  2023. #define GEMM_DEFAULT_OFFSET_A 0
  2024. #define GEMM_DEFAULT_OFFSET_B 0
  2025. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  2026. #define SYMV_P 16
  2027. // Darwin / Cross
  2028. #if defined(OS_DARWIN) && defined(CROSS)
  2029. #define SGEMM_DEFAULT_UNROLL_M 2
  2030. #define SGEMM_DEFAULT_UNROLL_N 2
  2031. #define DGEMM_DEFAULT_UNROLL_M 2
  2032. #define DGEMM_DEFAULT_UNROLL_N 2
  2033. #define CGEMM_DEFAULT_UNROLL_M 2
  2034. #define CGEMM_DEFAULT_UNROLL_N 2
  2035. #define ZGEMM_DEFAULT_UNROLL_M 2
  2036. #define ZGEMM_DEFAULT_UNROLL_N 2
  2037. #define SGEMM_DEFAULT_P 128
  2038. #define DGEMM_DEFAULT_P 128
  2039. #define CGEMM_DEFAULT_P 96
  2040. #define ZGEMM_DEFAULT_P 64
  2041. #define SGEMM_DEFAULT_Q 240
  2042. #define DGEMM_DEFAULT_Q 120
  2043. #define CGEMM_DEFAULT_Q 120
  2044. #define ZGEMM_DEFAULT_Q 120
  2045. #define SGEMM_DEFAULT_R 12288
  2046. #define DGEMM_DEFAULT_R 8192
  2047. #define CGEMM_DEFAULT_R 4096
  2048. #define ZGEMM_DEFAULT_R 4096
  2049. #else // Linux / Native
  2050. #if defined(CORTEXA53) || defined(CORTEXA57) || \
  2051. defined(CORTEXA72) || defined(CORTEXA73) || \
  2052. defined(FALKOR)
  2053. #define SGEMM_DEFAULT_UNROLL_M 16
  2054. #define SGEMM_DEFAULT_UNROLL_N 4
  2055. #define DGEMM_DEFAULT_UNROLL_M 8
  2056. #define DGEMM_DEFAULT_UNROLL_N 4
  2057. #define CGEMM_DEFAULT_UNROLL_M 8
  2058. #define CGEMM_DEFAULT_UNROLL_N 4
  2059. #define ZGEMM_DEFAULT_UNROLL_M 4
  2060. #define ZGEMM_DEFAULT_UNROLL_N 4
  2061. #define SGEMM_DEFAULT_P 512
  2062. #define DGEMM_DEFAULT_P 256
  2063. #define CGEMM_DEFAULT_P 256
  2064. #define ZGEMM_DEFAULT_P 128
  2065. #define SGEMM_DEFAULT_Q 1024
  2066. #define DGEMM_DEFAULT_Q 512
  2067. #define CGEMM_DEFAULT_Q 512
  2068. #define ZGEMM_DEFAULT_Q 512
  2069. #define SGEMM_DEFAULT_R 4096
  2070. #define DGEMM_DEFAULT_R 4096
  2071. #define CGEMM_DEFAULT_R 4096
  2072. #define ZGEMM_DEFAULT_R 2048
  2073. #elif defined(THUNDERX)
  2074. #define SGEMM_DEFAULT_UNROLL_M 4
  2075. #define SGEMM_DEFAULT_UNROLL_N 4
  2076. #define DGEMM_DEFAULT_UNROLL_M 2
  2077. #define DGEMM_DEFAULT_UNROLL_N 2
  2078. #define CGEMM_DEFAULT_UNROLL_M 2
  2079. #define CGEMM_DEFAULT_UNROLL_N 2
  2080. #define ZGEMM_DEFAULT_UNROLL_M 2
  2081. #define ZGEMM_DEFAULT_UNROLL_N 2
  2082. #define SGEMM_DEFAULT_P 128
  2083. #define DGEMM_DEFAULT_P 128
  2084. #define CGEMM_DEFAULT_P 96
  2085. #define ZGEMM_DEFAULT_P 64
  2086. #define SGEMM_DEFAULT_Q 240
  2087. #define DGEMM_DEFAULT_Q 120
  2088. #define CGEMM_DEFAULT_Q 120
  2089. #define ZGEMM_DEFAULT_Q 120
  2090. #define SGEMM_DEFAULT_R 12288
  2091. #define DGEMM_DEFAULT_R 8192
  2092. #define CGEMM_DEFAULT_R 4096
  2093. #define ZGEMM_DEFAULT_R 4096
  2094. #elif defined(THUNDERX2T99)
  2095. #define SGEMM_DEFAULT_UNROLL_M 16
  2096. #define SGEMM_DEFAULT_UNROLL_N 4
  2097. #define DGEMM_DEFAULT_UNROLL_M 8
  2098. #define DGEMM_DEFAULT_UNROLL_N 4
  2099. #define CGEMM_DEFAULT_UNROLL_M 8
  2100. #define CGEMM_DEFAULT_UNROLL_N 4
  2101. #define ZGEMM_DEFAULT_UNROLL_M 4
  2102. #define ZGEMM_DEFAULT_UNROLL_N 4
  2103. #define SGEMM_DEFAULT_P 128
  2104. #define DGEMM_DEFAULT_P 160
  2105. #define CGEMM_DEFAULT_P 128
  2106. #define ZGEMM_DEFAULT_P 128
  2107. #define SGEMM_DEFAULT_Q 352
  2108. #define DGEMM_DEFAULT_Q 128
  2109. #define CGEMM_DEFAULT_Q 224
  2110. #define ZGEMM_DEFAULT_Q 112
  2111. #define SGEMM_DEFAULT_R 4096
  2112. #define DGEMM_DEFAULT_R 4096
  2113. #define CGEMM_DEFAULT_R 4096
  2114. #define ZGEMM_DEFAULT_R 4096
  2115. #else // Other/undetected ARMv8 cores
  2116. #define SGEMM_DEFAULT_UNROLL_M 16
  2117. #define SGEMM_DEFAULT_UNROLL_N 4
  2118. #define DGEMM_DEFAULT_UNROLL_M 8
  2119. #define DGEMM_DEFAULT_UNROLL_N 4
  2120. #define CGEMM_DEFAULT_UNROLL_M 8
  2121. #define CGEMM_DEFAULT_UNROLL_N 4
  2122. #define ZGEMM_DEFAULT_UNROLL_M 4
  2123. #define ZGEMM_DEFAULT_UNROLL_N 4
  2124. #define SGEMM_DEFAULT_P 128
  2125. #define DGEMM_DEFAULT_P 160
  2126. #define CGEMM_DEFAULT_P 128
  2127. #define ZGEMM_DEFAULT_P 128
  2128. #define SGEMM_DEFAULT_Q 352
  2129. #define DGEMM_DEFAULT_Q 128
  2130. #define CGEMM_DEFAULT_Q 224
  2131. #define ZGEMM_DEFAULT_Q 112
  2132. #define SGEMM_DEFAULT_R 4096
  2133. #define DGEMM_DEFAULT_R 4096
  2134. #define CGEMM_DEFAULT_R 4096
  2135. #define ZGEMM_DEFAULT_R 4096
  2136. #endif // Cores
  2137. #endif // Linux / Darwin
  2138. #endif // ARMv8
  2139. #if defined(ARMV5)
  2140. #define SNUMOPT 2
  2141. #define DNUMOPT 2
  2142. #define GEMM_DEFAULT_OFFSET_A 0
  2143. #define GEMM_DEFAULT_OFFSET_B 0
  2144. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  2145. #define SGEMM_DEFAULT_UNROLL_M 2
  2146. #define SGEMM_DEFAULT_UNROLL_N 2
  2147. #define DGEMM_DEFAULT_UNROLL_M 2
  2148. #define DGEMM_DEFAULT_UNROLL_N 2
  2149. #define CGEMM_DEFAULT_UNROLL_M 2
  2150. #define CGEMM_DEFAULT_UNROLL_N 2
  2151. #define ZGEMM_DEFAULT_UNROLL_M 2
  2152. #define ZGEMM_DEFAULT_UNROLL_N 2
  2153. #define SGEMM_DEFAULT_P 128
  2154. #define DGEMM_DEFAULT_P 128
  2155. #define CGEMM_DEFAULT_P 96
  2156. #define ZGEMM_DEFAULT_P 64
  2157. #define SGEMM_DEFAULT_Q 240
  2158. #define DGEMM_DEFAULT_Q 120
  2159. #define CGEMM_DEFAULT_Q 120
  2160. #define ZGEMM_DEFAULT_Q 120
  2161. #define SGEMM_DEFAULT_R 12288
  2162. #define DGEMM_DEFAULT_R 8192
  2163. #define CGEMM_DEFAULT_R 4096
  2164. #define ZGEMM_DEFAULT_R 4096
  2165. #define SYMV_P 16
  2166. #endif
  2167. #ifdef CORTEXA9
  2168. #define SNUMOPT 2
  2169. #define DNUMOPT 2
  2170. #define GEMM_DEFAULT_OFFSET_A 0
  2171. #define GEMM_DEFAULT_OFFSET_B 0
  2172. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  2173. #define SGEMM_DEFAULT_UNROLL_M 4
  2174. #define SGEMM_DEFAULT_UNROLL_N 4
  2175. #define DGEMM_DEFAULT_UNROLL_M 4
  2176. #define DGEMM_DEFAULT_UNROLL_N 4
  2177. #define CGEMM_DEFAULT_UNROLL_M 2
  2178. #define CGEMM_DEFAULT_UNROLL_N 2
  2179. #define ZGEMM_DEFAULT_UNROLL_M 2
  2180. #define ZGEMM_DEFAULT_UNROLL_N 2
  2181. #define SGEMM_DEFAULT_P 128
  2182. #define DGEMM_DEFAULT_P 128
  2183. #define CGEMM_DEFAULT_P 96
  2184. #define ZGEMM_DEFAULT_P 64
  2185. #define SGEMM_DEFAULT_Q 240
  2186. #define DGEMM_DEFAULT_Q 120
  2187. #define CGEMM_DEFAULT_Q 120
  2188. #define ZGEMM_DEFAULT_Q 120
  2189. #define SGEMM_DEFAULT_R 12288
  2190. #define DGEMM_DEFAULT_R 8192
  2191. #define CGEMM_DEFAULT_R 4096
  2192. #define ZGEMM_DEFAULT_R 4096
  2193. #define SYMV_P 16
  2194. #endif
  2195. #ifdef CORTEXA15
  2196. #define SNUMOPT 2
  2197. #define DNUMOPT 2
  2198. #define GEMM_DEFAULT_OFFSET_A 0
  2199. #define GEMM_DEFAULT_OFFSET_B 0
  2200. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  2201. #define SGEMM_DEFAULT_UNROLL_M 4
  2202. #define SGEMM_DEFAULT_UNROLL_N 4
  2203. #define DGEMM_DEFAULT_UNROLL_M 4
  2204. #define DGEMM_DEFAULT_UNROLL_N 4
  2205. #define CGEMM_DEFAULT_UNROLL_M 2
  2206. #define CGEMM_DEFAULT_UNROLL_N 2
  2207. #define ZGEMM_DEFAULT_UNROLL_M 2
  2208. #define ZGEMM_DEFAULT_UNROLL_N 2
  2209. #define SGEMM_DEFAULT_P 128
  2210. #define DGEMM_DEFAULT_P 128
  2211. #define CGEMM_DEFAULT_P 96
  2212. #define ZGEMM_DEFAULT_P 64
  2213. #define SGEMM_DEFAULT_Q 240
  2214. #define DGEMM_DEFAULT_Q 120
  2215. #define CGEMM_DEFAULT_Q 120
  2216. #define ZGEMM_DEFAULT_Q 120
  2217. #define SGEMM_DEFAULT_R 12288
  2218. #define DGEMM_DEFAULT_R 8192
  2219. #define CGEMM_DEFAULT_R 4096
  2220. #define ZGEMM_DEFAULT_R 4096
  2221. #define SYMV_P 16
  2222. #endif
  2223. #if defined(ZARCH_GENERIC)
  2224. #define SNUMOPT 2
  2225. #define DNUMOPT 2
  2226. #define GEMM_DEFAULT_OFFSET_A 0
  2227. #define GEMM_DEFAULT_OFFSET_B 0
  2228. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  2229. #define SGEMM_DEFAULT_UNROLL_M 2
  2230. #define SGEMM_DEFAULT_UNROLL_N 2
  2231. #define DGEMM_DEFAULT_UNROLL_M 2
  2232. #define DGEMM_DEFAULT_UNROLL_N 2
  2233. #define CGEMM_DEFAULT_UNROLL_M 2
  2234. #define CGEMM_DEFAULT_UNROLL_N 2
  2235. #define ZGEMM_DEFAULT_UNROLL_M 2
  2236. #define ZGEMM_DEFAULT_UNROLL_N 2
  2237. #define SGEMM_DEFAULT_P 128
  2238. #define DGEMM_DEFAULT_P 128
  2239. #define CGEMM_DEFAULT_P 96
  2240. #define ZGEMM_DEFAULT_P 64
  2241. #define SGEMM_DEFAULT_Q 240
  2242. #define DGEMM_DEFAULT_Q 120
  2243. #define CGEMM_DEFAULT_Q 120
  2244. #define ZGEMM_DEFAULT_Q 120
  2245. #define SGEMM_DEFAULT_R 12288
  2246. #define DGEMM_DEFAULT_R 8192
  2247. #define CGEMM_DEFAULT_R 4096
  2248. #define ZGEMM_DEFAULT_R 4096
  2249. #define SYMV_P 16
  2250. #endif
  2251. #if defined(Z13)
  2252. #define SNUMOPT 2
  2253. #define DNUMOPT 2
  2254. #define GEMM_DEFAULT_OFFSET_A 0
  2255. #define GEMM_DEFAULT_OFFSET_B 0
  2256. #define GEMM_DEFAULT_ALIGN 0x03fffUL
  2257. #define SGEMM_DEFAULT_UNROLL_M 8
  2258. #define SGEMM_DEFAULT_UNROLL_N 4
  2259. #define DGEMM_DEFAULT_UNROLL_M 8
  2260. #define DGEMM_DEFAULT_UNROLL_N 4
  2261. #define CGEMM_DEFAULT_UNROLL_M 4
  2262. #define CGEMM_DEFAULT_UNROLL_N 4
  2263. #define ZGEMM_DEFAULT_UNROLL_M 4
  2264. #define ZGEMM_DEFAULT_UNROLL_N 4
  2265. #define SGEMM_DEFAULT_P 456
  2266. #define DGEMM_DEFAULT_P 320
  2267. #define CGEMM_DEFAULT_P 480
  2268. #define ZGEMM_DEFAULT_P 224
  2269. #define SGEMM_DEFAULT_Q 488
  2270. #define DGEMM_DEFAULT_Q 384
  2271. #define CGEMM_DEFAULT_Q 128
  2272. #define ZGEMM_DEFAULT_Q 352
  2273. #define SGEMM_DEFAULT_R 8192
  2274. #define DGEMM_DEFAULT_R 4096
  2275. #define CGEMM_DEFAULT_R 4096
  2276. #define ZGEMM_DEFAULT_R 2048
  2277. #define SYMV_P 16
  2278. #endif
  2279. #ifdef GENERIC
  2280. #define SNUMOPT 2
  2281. #define DNUMOPT 2
  2282. #define GEMM_DEFAULT_OFFSET_A 0
  2283. #define GEMM_DEFAULT_OFFSET_B 0
  2284. #define GEMM_DEFAULT_ALIGN 0x0ffffUL
  2285. #define SGEMM_DEFAULT_UNROLL_N 2
  2286. #define DGEMM_DEFAULT_UNROLL_N 2
  2287. #define QGEMM_DEFAULT_UNROLL_N 2
  2288. #define CGEMM_DEFAULT_UNROLL_N 2
  2289. #define ZGEMM_DEFAULT_UNROLL_N 2
  2290. #define XGEMM_DEFAULT_UNROLL_N 1
  2291. #ifdef ARCH_X86
  2292. #define SGEMM_DEFAULT_UNROLL_M 2
  2293. #define DGEMM_DEFAULT_UNROLL_M 2
  2294. #define QGEMM_DEFAULT_UNROLL_M 2
  2295. #define CGEMM_DEFAULT_UNROLL_M 2
  2296. #define ZGEMM_DEFAULT_UNROLL_M 2
  2297. #define XGEMM_DEFAULT_UNROLL_M 1
  2298. #else
  2299. #define SGEMM_DEFAULT_UNROLL_M 2
  2300. #define DGEMM_DEFAULT_UNROLL_M 2
  2301. #define QGEMM_DEFAULT_UNROLL_M 2
  2302. #define CGEMM_DEFAULT_UNROLL_M 2
  2303. #define ZGEMM_DEFAULT_UNROLL_M 2
  2304. #define XGEMM_DEFAULT_UNROLL_M 1
  2305. #endif
  2306. #define SGEMM_DEFAULT_P sgemm_p
  2307. #define DGEMM_DEFAULT_P dgemm_p
  2308. #define QGEMM_DEFAULT_P qgemm_p
  2309. #define CGEMM_DEFAULT_P cgemm_p
  2310. #define ZGEMM_DEFAULT_P zgemm_p
  2311. #define XGEMM_DEFAULT_P xgemm_p
  2312. #define SGEMM_DEFAULT_R sgemm_r
  2313. #define DGEMM_DEFAULT_R dgemm_r
  2314. #define QGEMM_DEFAULT_R qgemm_r
  2315. #define CGEMM_DEFAULT_R cgemm_r
  2316. #define ZGEMM_DEFAULT_R zgemm_r
  2317. #define XGEMM_DEFAULT_R xgemm_r
  2318. #define SGEMM_DEFAULT_Q 128
  2319. #define DGEMM_DEFAULT_Q 128
  2320. #define QGEMM_DEFAULT_Q 128
  2321. #define CGEMM_DEFAULT_Q 128
  2322. #define ZGEMM_DEFAULT_Q 128
  2323. #define XGEMM_DEFAULT_Q 128
  2324. #define SYMV_P 16
  2325. #endif
  2326. #ifndef QGEMM_DEFAULT_UNROLL_M
  2327. #define QGEMM_DEFAULT_UNROLL_M 2
  2328. #endif
  2329. #ifndef QGEMM_DEFAULT_UNROLL_N
  2330. #define QGEMM_DEFAULT_UNROLL_N 2
  2331. #endif
  2332. #ifndef XGEMM_DEFAULT_UNROLL_M
  2333. #define XGEMM_DEFAULT_UNROLL_M 2
  2334. #endif
  2335. #ifndef XGEMM_DEFAULT_UNROLL_N
  2336. #define XGEMM_DEFAULT_UNROLL_N 2
  2337. #endif
  2338. #ifndef HAVE_SSE2
  2339. #define SHUFPD_0 shufps $0x44,
  2340. #define SHUFPD_1 shufps $0x4e,
  2341. #define SHUFPD_2 shufps $0xe4,
  2342. #define SHUFPD_3 shufps $0xee,
  2343. #endif
  2344. #ifndef SHUFPD_0
  2345. #define SHUFPD_0 shufpd $0,
  2346. #endif
  2347. #ifndef SHUFPD_1
  2348. #define SHUFPD_1 shufpd $1,
  2349. #endif
  2350. #ifndef SHUFPD_2
  2351. #define SHUFPD_2 shufpd $2,
  2352. #endif
  2353. #ifndef SHUFPD_3
  2354. #define SHUFPD_3 shufpd $3,
  2355. #endif
  2356. #ifndef SHUFPS_39
  2357. #define SHUFPS_39 shufps $0x39,
  2358. #endif
  2359. #endif