mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 19:59:05 +08:00
update bench_gemm
This commit is contained in:
parent
2da1594750
commit
333b497383
@ -148,7 +148,7 @@ int main(int argc, char ** argv)
|
|||||||
int m = s;
|
int m = s;
|
||||||
int n = s;
|
int n = s;
|
||||||
int p = s;
|
int p = s;
|
||||||
int cache_size = -1;
|
int cache_size1=-1, cache_size2=l2, cache_size3 = 0;
|
||||||
|
|
||||||
bool need_help = false;
|
bool need_help = false;
|
||||||
for (int i=1; i<argc;)
|
for (int i=1; i<argc;)
|
||||||
@ -169,7 +169,13 @@ int main(int argc, char ** argv)
|
|||||||
else if(argv[i][1]=='c')
|
else if(argv[i][1]=='c')
|
||||||
{
|
{
|
||||||
++i;
|
++i;
|
||||||
cache_size = atoi(argv[i++]);
|
cache_size1 = atoi(argv[i++]);
|
||||||
|
if(argv[i][0]!='-')
|
||||||
|
{
|
||||||
|
cache_size2 = atoi(argv[i++]);
|
||||||
|
if(argv[i][0]!='-')
|
||||||
|
cache_size3 = atoi(argv[i++]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if(argv[i][1]=='t')
|
else if(argv[i][1]=='t')
|
||||||
{
|
{
|
||||||
@ -191,14 +197,14 @@ int main(int argc, char ** argv)
|
|||||||
|
|
||||||
if(need_help)
|
if(need_help)
|
||||||
{
|
{
|
||||||
std::cout << argv[0] << " -s <matrix sizes> -c <cache size> -t <nb tries> -p <nb repeats>\n";
|
std::cout << argv[0] << " -s <matrix sizes> -c <cache sizes> -t <nb tries> -p <nb repeats>\n";
|
||||||
std::cout << " <matrix sizes> : size\n";
|
std::cout << " <matrix sizes> : size\n";
|
||||||
std::cout << " <matrix sizes> : rows columns depth\n";
|
std::cout << " <matrix sizes> : rows columns depth\n";
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(cache_size>0)
|
if(cache_size1>0)
|
||||||
setCpuCacheSizes(cache_size,96*cache_size);
|
setCpuCacheSizes(cache_size1,cache_size2,cache_size3);
|
||||||
|
|
||||||
|
|
||||||
A a(m,p); a.setRandom();
|
A a(m,p); a.setRandom();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user