Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
ZhouShuya
OpenXG-RAN
Commits
22dae457
Commit
22dae457
authored
Oct 09, 2018
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
additional SIMD optimizations
parent
b336ddc6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
11 deletions
+27
-11
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c
+26
-10
openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h
openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h
+1
-1
No files found.
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c
View file @
22dae457
...
...
@@ -420,7 +420,7 @@ void applyFtoleft(t_nrPolar_params *pp,decoder_node_t *node) {
#ifdef DEBUG_NEW_IMPL
printf
(
"betal[0] %d (%p)
\n
"
,
betal
[
0
],
&
betal
[
0
]);
#endif
pp
->
nr_polar_u
[
node
->
first_leaf_index
]
=
(
betal
[
0
]
+
1
)
>>
1
;
pp
->
nr_polar_u
[
node
->
first_leaf_index
]
=
(
1
+
betal
[
0
]
)
>>
1
;
#ifdef DEBUG_NEW_IMPL
printf
(
"Setting bit %d to %d (LLR %d)
\n
"
,
node
->
first_leaf_index
,(
betal
[
0
]
+
1
)
>>
1
,
alpha_l
[
0
]);
#endif
...
...
@@ -466,7 +466,7 @@ void applyGtoright(t_nrPolar_params *pp,decoder_node_t *node) {
}
if
(
node
->
Nv
==
2
)
{
// apply hard decision on right node
betar
[
0
]
=
(
alpha_r
[
0
]
>
0
)
?
-
1
:
1
;
pp
->
nr_polar_u
[
node
->
first_leaf_index
+
1
]
=
(
betar
[
0
]
+
1
)
>>
1
;
pp
->
nr_polar_u
[
node
->
first_leaf_index
+
1
]
=
(
1
+
betar
[
0
]
)
>>
1
;
#ifdef DEBUG_NEW_IMPL
printf
(
"Setting bit %d to %d (LLR %d frozen_mask %d)
\n
"
,
node
->
first_leaf_index
+
1
,(
betar
[
0
]
+
1
)
>>
1
,
alpha_r
[
0
],
frozen_mask
);
#endif
...
...
@@ -474,7 +474,6 @@ void applyGtoright(t_nrPolar_params *pp,decoder_node_t *node) {
}
}
void
computeBeta
(
t_nrPolar_params
*
pp
,
decoder_node_t
*
node
)
{
int16_t
*
betav
=
node
->
beta
;
...
...
@@ -484,14 +483,31 @@ void computeBeta(t_nrPolar_params *pp,decoder_node_t *node) {
printf
(
"Computing beta @ level %d first_leaf_index %d (all_frozen %d)
\n
"
,
node
->
level
,
node
->
first_leaf_index
,
node
->
left
->
all_frozen
);
#endif
if
(
node
->
left
->
all_frozen
==
0
)
{
// if left node is not aggregation of frozen bits
for
(
int
i
=
0
;
i
<
node
->
Nv
/
2
;
i
++
)
{
betav
[
i
]
=
(
betal
[
i
]
!=
betar
[
i
])
?
1
:
-
1
;
#ifdef DEBUG_NEW_IMPL
printf
(
"COMPUTE betav[%d] %d (%p)
\n
"
,
i
,
betav
[
i
],
&
betav
[
i
]);
#endif
/*#if defined(__AVX2__)
int avx2mod = (node->Nv/2)&15;
if (avx2mod == 0) {
int avx2len = node->Nv/2/16;
for (int i=0;i<avx2len;i++) {
((__m256i*)betav)[i] = _mm256_sign_epi16(((__m256i*)betar)[i],
((__m256i*)betal)[i]);
}
}
else if (avx2mod == 8) {
((__m128i*)betav)[0] = _mm_sign_epi16(((__m128i*)betar)[0],
((__m128i*)betal)[0]);
}
else if (avx2mod == 4) {
((__m64*)betav)[0] = _mm_sign_pi16(((__m64*)betar)[0],
((__m64*)betal)[0]);
}
else
#endif*/
{
for
(
int
i
=
0
;
i
<
node
->
Nv
/
2
;
i
++
)
{
betav
[
i
]
=
(
betal
[
i
]
!=
betar
[
i
])
?
1
:
-
1
;
}
}
}
else
memcpy
((
void
*
)
&
betav
[
0
],
betar
,(
node
->
Nv
/
2
)
*
sizeof
(
int16_t
));
memcpy
((
void
*
)
&
betav
[
node
->
Nv
/
2
],
betar
,(
node
->
Nv
/
2
)
*
sizeof
(
int16_t
));
...
...
openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h
View file @
22dae457
...
...
@@ -67,7 +67,7 @@ typedef struct decoder_node_t_s {
int
first_leaf_index
;
int
all_frozen
;
int16_t
*
alpha
;
int
8
_t
*
beta
;
int
16
_t
*
beta
;
}
decoder_node_t
;
typedef
struct
decoder_tree_t_s
{
...
...
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