Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stefan Strogin
flac
Commits
57297eea
Commit
57297eea
authored
Jan 30, 2014
by
Erik de Castro Lopo
Browse files
Add __INTEL_COMPILER to _MSC_VER #ifdefs.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
parent
d40e986a
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/libFLAC/cpu.c
View file @
57297eea
...
...
@@ -450,7 +450,7 @@ void FLAC__cpu_info(FLAC__CPUInfo *info)
void
FLAC__cpu_info_x86
(
FLAC__uint32
*
flags_edx
,
FLAC__uint32
*
flags_ecx
)
{
#if defined _MSC_VER
#if defined _MSC_VER
|| defined __INTEL_COMPILER
int
cpuinfo
[
4
];
__cpuid
(
cpuinfo
,
1
);
*
flags_ecx
=
cpuinfo
[
2
];
...
...
src/libFLAC/stream_encoder_intrin_sse2.c
View file @
57297eea
...
...
@@ -70,7 +70,7 @@ void FLAC__precompute_partition_info_sums_intrin_sse2(const FLAC__int32 residual
if
(
e1
>
end
)
e1
=
end
;
/* try flac -l 1 -b 16 and you'll be here */
/* assumption: residual[] is properly aligned so (residual + e1) is properly aligned too and _mm_loadu_si128() is fast*/
/* assumption: residual[] is properly aligned so (residual + e1) is properly aligned too and _mm_loadu_si128() is fast
*/
for
(
;
residual_sample
<
e1
;
residual_sample
++
)
abs_residual_partition_sum
+=
abs
(
residual
[
residual_sample
]);
/* abs(INT_MIN) is undefined, but if the residual is INT_MIN we have bigger problems */
...
...
@@ -121,7 +121,7 @@ void FLAC__precompute_partition_info_sums_intrin_sse2(const FLAC__int32 residual
mm_sum
=
_mm_add_epi64
(
mm_sum
,
_mm_srli_si128
(
mm_sum
,
8
));
#ifdef FLAC__CPU_IA32
#ifdef _MSC_VER
#if
def
ined
_MSC_VER
|| defined __INTEL_COMPILER
abs_residual_partition_sum
+=
mm_sum
.
m128i_u64
[
0
];
#else
{
...
...
src/libFLAC/stream_encoder_intrin_ssse3.c
View file @
57297eea
...
...
@@ -70,7 +70,7 @@ void FLAC__precompute_partition_info_sums_intrin_ssse3(const FLAC__int32 residua
if
(
e1
>
end
)
e1
=
end
;
/* try flac -l 1 -b 16 and you'll be here */
/* assumption: residual[] is properly aligned so (residual + e1) is properly aligned too and _mm_loadu_si128() is fast*/
/* assumption: residual[] is properly aligned so (residual + e1) is properly aligned too and _mm_loadu_si128() is fast
*/
for
(
;
residual_sample
<
e1
;
residual_sample
++
)
abs_residual_partition_sum
+=
abs
(
residual
[
residual_sample
]);
/* abs(INT_MIN) is undefined, but if the residual is INT_MIN we have bigger problems */
...
...
@@ -117,7 +117,7 @@ void FLAC__precompute_partition_info_sums_intrin_ssse3(const FLAC__int32 residua
mm_sum
=
_mm_add_epi64
(
mm_sum
,
_mm_srli_si128
(
mm_sum
,
8
));
#ifdef FLAC__CPU_IA32
#ifdef _MSC_VER
#if
def
ined
_MSC_VER
|| defined __INTEL_COMPILER
abs_residual_partition_sum
+=
mm_sum
.
m128i_u64
[
0
];
#else
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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