Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
C
compass-github-pull
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
steinbac
compass-github-pull
Commits
7c6fa88d
Commit
7c6fa88d
authored
Aug 17, 2018
by
Peter Steinbach
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implemented levels_available API
parent
242008ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
5 deletions
+25
-5
include/detail/api.hpp
include/detail/api.hpp
+14
-0
include/detail/rt/x86_sizes.hpp
include/detail/rt/x86_sizes.hpp
+11
-5
No files found.
include/detail/api.hpp
View file @
7c6fa88d
...
...
@@ -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
;
...
...
include/detail/rt/x86_sizes.hpp
View file @
7c6fa88d
...
...
@@ -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
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment