Added ability to access the cache sizes from the tensor devices

This commit is contained in:
Benoit Steiner
2016-04-14 21:25:06 -07:00
parent 18e6f67426
commit a62e924656
3 changed files with 39 additions and 0 deletions

View File

@@ -2224,6 +2224,16 @@ inline std::ptrdiff_t l2CacheSize()
return l2;
}
/** \returns the currently set level 3 cpu cache size (in bytes) used to estimate the ideal blocking size paramete\
rs.
* \sa setCpuCacheSize */
inline std::ptrdiff_t l3CacheSize()
{
std::ptrdiff_t l1, l2, l3;
internal::manage_caching_sizes(GetAction, &l1, &l2, &l3);
return l3;
}
/** Set the cpu L1 and L2 cache sizes (in bytes).
* These values are use to adjust the size of the blocks
* for the algorithms working per blocks.