Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dav1d
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
François Cartegnie
dav1d
Commits
9a48df2e
Commit
9a48df2e
authored
Sep 28, 2018
by
Steve Lhomme
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add helper functions for ctz/clz
parent
79764604
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
include/common/attributes.h
include/common/attributes.h
+12
-0
No files found.
include/common/attributes.h
View file @
9a48df2e
...
@@ -51,4 +51,16 @@
...
@@ -51,4 +51,16 @@
#define ALIGN_STK_16(type, var, sz1d, sznd) \
#define ALIGN_STK_16(type, var, sz1d, sznd) \
ALIGN(type var[sz1d]sznd, 16)
ALIGN(type var[sz1d]sznd, 16)
static
inline
int
ctz
(
const
unsigned
int
mask
)
{
return
__builtin_ctz
(
mask
);
}
static
inline
int
clz
(
const
unsigned
int
mask
)
{
return
__builtin_clz
(
mask
);
}
static
inline
int
clzll
(
const
unsigned
long
long
mask
)
{
return
__builtin_clzll
(
mask
);
}
#endif
/* __DAV1D_COMMON_ATTRIBUTES_H__ */
#endif
/* __DAV1D_COMMON_ATTRIBUTES_H__ */
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