Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Opus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xiph.Org
Opus
Merge requests
!107
add arm rtcd for apple
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
add arm rtcd for apple
mklingb/opus:ios-rtcd
into
main
Overview
1
Commits
1
Pipelines
3
Changes
1
Closed
Michael Klingbeil
requested to merge
mklingb/opus:ios-rtcd
into
main
1 year ago
Overview
1
Commits
1
Pipelines
3
Changes
1
Expand
0
0
Merge request reports
Compare
main
version 1
a68f0f7a
1 year ago
main (base)
and
latest version
latest version
69cca844
1 commit,
1 year ago
version 1
a68f0f7a
1 commit,
1 year ago
1 file
+
27
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
celt/arm/armcpu.c
+
27
−
0
Options
@@ -164,6 +164,33 @@ opus_uint32 opus_cpu_capabilities(void)
}
return
flags
;
}
#elif defined(__APPLE__)
#include
<sys/types.h>
#include
<sys/sysctl.h>
opus_uint32
opus_cpu_capabilities
(
void
)
{
opus_uint32
flags
=
0
;
#if defined(OPUS_ARM_MAY_HAVE_DOTPROD)
size_t
size
=
sizeof
(
uint32_t
);
uint32_t
value
=
0
;
if
(
!
sysctlbyname
(
"hw.optional.arm.FEAT_DotProd"
,
&
value
,
&
size
,
NULL
,
0
)
&&
value
)
{
flags
|=
OPUS_CPU_ARM_DOTPROD_FLAG
;
}
#endif
#if defined(OPUS_ARM_PRESUME_AARCH64_NEON_INTR)
flags
|=
OPUS_CPU_ARM_EDSP_FLAG
|
OPUS_CPU_ARM_MEDIA_FLAG
|
OPUS_CPU_ARM_NEON_FLAG
;
# if defined(OPUS_ARM_PRESUME_DOTPROD)
flags
|=
OPUS_CPU_ARM_DOTPROD_FLAG
;
# endif
#endif
return
flags
;
}
#else
/* The feature registers which can tell us what the processor supports are
* accessible in priveleged modes only, so we can't have a general user-space
Loading