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
spbro
OpenXG-RAN
Commits
a6e11e70
Commit
a6e11e70
authored
1 year ago
by
Vaibhav Shrivastava
Committed by
Laurent THOMAS
1 year ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix review comments of cppcheck warnings related to nullPointerArithmeticRedundantCheck
parent
efc5ce39
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
nfapi/open-nFAPI/nfapi/src/nfapi_p5.c
nfapi/open-nFAPI/nfapi/src/nfapi_p5.c
+3
-2
openair1/PHY/TOOLS/cmult_sv.c
openair1/PHY/TOOLS/cmult_sv.c
+6
-7
No files found.
nfapi/open-nFAPI/nfapi/src/nfapi_p5.c
View file @
a6e11e70
...
...
@@ -1039,8 +1039,6 @@ static uint32_t get_packed_msg_len(uintptr_t msgHead, uintptr_t msgEnd) {
int
nfapi_nr_p5_message_pack
(
void
*
pMessageBuf
,
uint32_t
messageBufLen
,
void
*
pPackedBuf
,
uint32_t
packedBufLen
,
nfapi_p4_p5_codec_config_t
*
config
)
{
nfapi_p4_p5_message_header_t
*
pMessageHeader
=
pMessageBuf
;
uint8_t
*
pWritePackedMessage
=
pPackedBuf
;
uint8_t
*
pPackMessageEnd
=
(
pWritePackedMessage
==
NULL
)
?
NULL
:
pPackedBuf
+
packedBufLen
;
uint8_t
*
pPackedLengthField
=
(
pWritePackedMessage
==
NULL
)
?
NULL
:
&
pWritePackedMessage
[
4
];
uint32_t
packedMsgLen
;
uint16_t
packedMsgLen16
;
...
...
@@ -1049,6 +1047,9 @@ int nfapi_nr_p5_message_pack(void *pMessageBuf, uint32_t messageBufLen, void *pP
return
-
1
;
}
uint8_t
*
pPackMessageEnd
=
pPackedBuf
+
packedBufLen
;
uint8_t
*
pPackedLengthField
=
&
pWritePackedMessage
[
4
];
// pack the message
if
(
push16
(
pMessageHeader
->
phy_id
,
&
pWritePackedMessage
,
pPackMessageEnd
)
&&
push16
(
pMessageHeader
->
message_id
,
&
pWritePackedMessage
,
pPackMessageEnd
)
&&
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/TOOLS/cmult_sv.c
View file @
a6e11e70
...
...
@@ -89,8 +89,7 @@ void rotate_cpx_vector(const c16_t *const x, const c16_t *const alpha, c16_t *y,
// stores result in y
// N is the number of complex numbers
// output_shift reduces the result of the multiplication by this number of bits
//AssertFatal(N%8==0, "To be developped");
if
(
(
intptr_t
)
x
%
32
==
0
&&
!
(
intptr_t
)
y
%
32
==
0
&&
__builtin_cpu_supports
(
"avx2"
))
{
if
(
__builtin_cpu_supports
(
"avx2"
))
{
// output is 32 bytes aligned, but not the input
const
c16_t
for_re
=
{
alpha
->
r
,
-
alpha
->
i
};
...
...
@@ -132,17 +131,17 @@ void rotate_cpx_vector(const c16_t *const x, const c16_t *const alpha, c16_t *y,
__m256i
*
xd
=
(
__m256i
*
)
x
;
const
__m256i
*
end
=
xd
+
N
/
8
;
for
(
__m256i
*
yd
=
(
__m256i
*
)
y
;
xd
<
end
;
yd
++
,
xd
++
)
{
const
__m256i
xre
=
simde_mm256_srai_epi32
(
simde_mm256_madd_epi16
(
*
xd
,
alpha_for_real
),
const
__m256i
y256
=
_mm256_lddqu_si256
(
xd
);
const
__m256i
xre
=
simde_mm256_srai_epi32
(
simde_mm256_madd_epi16
(
y256
,
alpha_for_real
),
output_shift
);
const
__m256i
xim
=
simde_mm256_srai_epi32
(
simde_mm256_madd_epi16
(
*
xd
,
alpha_for_im
),
const
__m256i
xim
=
simde_mm256_srai_epi32
(
simde_mm256_madd_epi16
(
y256
,
alpha_for_im
),
output_shift
);
// a bit faster than unpacklo+unpackhi+packs
const
__m256i
tmp
=
simde_mm256_packs_epi32
(
xre
,
xim
);
*
yd
=
simde_mm256_shuffle_epi8
(
tmp
,
perm_mask
);
_mm256_storeu_si256
(
yd
,
simde_mm256_shuffle_epi8
(
tmp
,
perm_mask
)
);
}
c16_t
*
alpha16
=
(
c16_t
*
)
alpha
,
*
yLast
;
if
(
y
!=
NULL
)
yLast
=
((
c16_t
*
)
y
)
+
(
N
/
8
)
*
8
;
yLast
=
((
c16_t
*
)
y
)
+
(
N
/
8
)
*
8
;
for
(
c16_t
*
xTail
=
(
c16_t
*
)
end
;
xTail
<
((
c16_t
*
)
x
)
+
N
;
xTail
++
,
yLast
++
)
{
...
...
This diff is collapsed.
Click to expand it.
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