Commit 7c6fa88d authored by Peter Steinbach's avatar Peter Steinbach

implemented levels_available API

parent 242008ce
......@@ -96,6 +96,13 @@ namespace compass {
struct cacheline{
static std::uint32_t levels_available(){
using current_arch_t = ct::arch::type;
return compass::runtime::detail::size::cacheline::levels_available(current_arch_t());
}
static std::uint32_t level(int _lvl){
using current_arch_t = ct::arch::type;
......@@ -106,6 +113,13 @@ namespace compass {
struct cache{
static std::uint32_t levels_available(){
using current_arch_t = ct::arch::type;
return compass::runtime::detail::size::cache::levels_available(current_arch_t());
}
static std::uint32_t level(int _lvl){
using current_arch_t = ct::arch::type;
......
......@@ -60,12 +60,14 @@ namespace compass {
public:
static const cacheline& get(){
static cacheline instance;
return instance;
}
static const cacheline& get(){
static cacheline instance;
return instance;
}
static std::uint32_t levels_available(ct::x86_tag){
return cacheline::get().ebx_data_.size();
}
static std::uint32_t level(int _lvl, ct::x86_tag){
......@@ -123,6 +125,10 @@ namespace compass {
return instance;
}
static std::uint32_t levels_available(ct::x86_tag){
return cache::get().ebx_data_.size();
}
static std::uint32_t level(int _lvl, ct::x86_tag){
if(_lvl <= 0){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment