Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
0c4c6d60
Commit
0c4c6d60
authored
Sep 08, 2016
by
Sebastian Lackner
Committed by
Alexandre Julliard
Sep 08, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vcomp: Implement _vcomp_reduction_r8 and add tests.
Signed-off-by:
Sebastian Lackner
<
sebastian@fds-team.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
363d8d21
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
57 additions
and
8 deletions
+57
-8
main.c
dlls/vcomp/main.c
+40
-0
vcomp.c
dlls/vcomp/tests/vcomp.c
+11
-2
vcomp.spec
dlls/vcomp/vcomp.spec
+1
-1
vcomp100.spec
dlls/vcomp100/vcomp100.spec
+1
-1
vcomp110.spec
dlls/vcomp110/vcomp110.spec
+1
-1
vcomp120.spec
dlls/vcomp120/vcomp120.spec
+1
-1
vcomp140.spec
dlls/vcomp140/vcomp140.spec
+1
-1
vcomp90.spec
dlls/vcomp90/vcomp90.spec
+1
-1
No files found.
dlls/vcomp/main.c
View file @
0c4c6d60
...
...
@@ -894,6 +894,46 @@ void CDECL _vcomp_atomic_sub_r8(double *dest, double val)
while
(
interlocked_cmpxchg64
((
LONG64
*
)
dest
,
new
,
old
)
!=
old
);
}
static
void
CDECL
_vcomp_atomic_bool_and_r8
(
double
*
dest
,
double
val
)
{
LONG64
old
,
new
;
do
{
old
=
*
(
LONG64
*
)
dest
;
*
(
double
*
)
&
new
=
(
*
(
double
*
)
&
old
!=
0
.
0
)
?
(
val
!=
0
.
0
)
:
0
.
0
;
}
while
(
interlocked_cmpxchg64
((
LONG64
*
)
dest
,
new
,
old
)
!=
old
);
}
static
void
CDECL
_vcomp_atomic_bool_or_r8
(
double
*
dest
,
double
val
)
{
LONG64
old
,
new
;
do
{
old
=
*
(
LONG64
*
)
dest
;
*
(
double
*
)
&
new
=
(
*
(
double
*
)
&
old
!=
0
.
0
)
?
*
(
double
*
)
&
old
:
(
val
!=
0
.
0
);
}
while
(
interlocked_cmpxchg64
((
LONG64
*
)
dest
,
new
,
old
)
!=
old
);
}
void
CDECL
_vcomp_reduction_r8
(
unsigned
int
flags
,
double
*
dest
,
double
val
)
{
static
void
(
CDECL
*
const
funcs
[])(
double
*
,
double
)
=
{
_vcomp_atomic_add_r8
,
_vcomp_atomic_add_r8
,
_vcomp_atomic_mul_r8
,
_vcomp_atomic_bool_or_r8
,
_vcomp_atomic_bool_or_r8
,
_vcomp_atomic_bool_or_r8
,
_vcomp_atomic_bool_and_r8
,
_vcomp_atomic_bool_or_r8
,
};
unsigned
int
op
=
(
flags
>>
8
)
&
0xf
;
op
=
min
(
op
,
sizeof
(
funcs
)
/
sizeof
(
funcs
[
0
])
-
1
);
funcs
[
op
](
dest
,
val
);
}
int
CDECL
omp_get_dynamic
(
void
)
{
TRACE
(
"stub
\n
"
);
...
...
dlls/vcomp/tests/vcomp.c
View file @
0c4c6d60
...
...
@@ -108,6 +108,7 @@ static void (CDECL *p_vcomp_reduction_i2)(unsigned int flags, short *dest, sh
static
void
(
CDECL
*
p_vcomp_reduction_i4
)(
unsigned
int
flags
,
int
*
dest
,
int
val
);
static
void
(
CDECL
*
p_vcomp_reduction_i8
)(
unsigned
int
flags
,
LONG64
*
dest
,
LONG64
val
);
static
void
(
CDECL
*
p_vcomp_reduction_r4
)(
unsigned
int
flags
,
float
*
dest
,
float
val
);
static
void
(
CDECL
*
p_vcomp_reduction_r8
)(
unsigned
int
flags
,
double
*
dest
,
double
val
);
static
void
(
CDECL
*
p_vcomp_reduction_u1
)(
unsigned
int
flags
,
unsigned
char
*
dest
,
unsigned
char
val
);
static
void
(
CDECL
*
p_vcomp_reduction_u2
)(
unsigned
int
flags
,
unsigned
short
*
dest
,
unsigned
short
val
);
static
void
(
CDECL
*
p_vcomp_reduction_u4
)(
unsigned
int
flags
,
unsigned
int
*
dest
,
unsigned
int
val
);
...
...
@@ -358,6 +359,7 @@ static BOOL init_vcomp(void)
VCOMP_GET_PROC
(
_vcomp_reduction_i4
);
VCOMP_GET_PROC
(
_vcomp_reduction_i8
);
VCOMP_GET_PROC
(
_vcomp_reduction_r4
);
VCOMP_GET_PROC
(
_vcomp_reduction_r8
);
VCOMP_GET_PROC
(
_vcomp_reduction_u1
);
VCOMP_GET_PROC
(
_vcomp_reduction_u2
);
VCOMP_GET_PROC
(
_vcomp_reduction_u4
);
...
...
@@ -2110,7 +2112,7 @@ static void test_reduction_integer64(void)
}
}
static
void
test_reduction_float
(
void
)
static
void
test_reduction_float
_double
(
void
)
{
static
const
struct
{
...
...
@@ -2161,6 +2163,13 @@ static void test_reduction_float(void)
ok
(
tests
[
i
].
expected
-
0
.
001
<
val
&&
val
<
tests
[
i
].
expected
+
0
.
001
,
"test %d: expected val == %f, got %f
\n
"
,
i
,
tests
[
i
].
expected
,
val
);
}
for
(
i
=
0
;
i
<
sizeof
(
tests
)
/
sizeof
(
tests
[
0
]);
i
++
)
{
double
val
=
tests
[
i
].
v1
;
p_vcomp_reduction_r8
(
tests
[
i
].
flags
,
&
val
,
tests
[
i
].
v2
);
ok
(
tests
[
i
].
expected
-
0
.
001
<
val
&&
val
<
tests
[
i
].
expected
+
0
.
001
,
"test %d: expected val == %f, got %f
\n
"
,
i
,
tests
[
i
].
expected
,
val
);
}
}
START_TEST
(
vcomp
)
...
...
@@ -2191,7 +2200,7 @@ START_TEST(vcomp)
test_reduction_integer16
();
test_reduction_integer32
();
test_reduction_integer64
();
test_reduction_float
();
test_reduction_float
_double
();
release_vcomp
();
}
dlls/vcomp/vcomp.spec
View file @
0c4c6d60
...
...
@@ -78,7 +78,7 @@
@ cdecl _vcomp_reduction_i4(long ptr long)
@ cdecl _vcomp_reduction_i8(long ptr int64)
@ cdecl _vcomp_reduction_r4(long ptr float)
@
stub _vcomp_reduction_r8
@
cdecl _vcomp_reduction_r8(long ptr double)
@ cdecl _vcomp_reduction_u1(long ptr long) _vcomp_reduction_i1
@ cdecl _vcomp_reduction_u2(long ptr long) _vcomp_reduction_i2
@ cdecl _vcomp_reduction_u4(long ptr long) _vcomp_reduction_i4
...
...
dlls/vcomp100/vcomp100.spec
View file @
0c4c6d60
...
...
@@ -78,7 +78,7 @@
@ cdecl _vcomp_reduction_i4(long ptr long) vcomp._vcomp_reduction_i4
@ cdecl _vcomp_reduction_i8(long ptr int64) vcomp._vcomp_reduction_i8
@ cdecl _vcomp_reduction_r4(long ptr float) vcomp._vcomp_reduction_r4
@
stub
_vcomp_reduction_r8
@
cdecl _vcomp_reduction_r8(long ptr double) vcomp.
_vcomp_reduction_r8
@ cdecl _vcomp_reduction_u1(long ptr long) vcomp._vcomp_reduction_u1
@ cdecl _vcomp_reduction_u2(long ptr long) vcomp._vcomp_reduction_u2
@ cdecl _vcomp_reduction_u4(long ptr long) vcomp._vcomp_reduction_u4
...
...
dlls/vcomp110/vcomp110.spec
View file @
0c4c6d60
...
...
@@ -79,7 +79,7 @@
@ cdecl _vcomp_reduction_i4(long ptr long) vcomp._vcomp_reduction_i4
@ cdecl _vcomp_reduction_i8(long ptr int64) vcomp._vcomp_reduction_i8
@ cdecl _vcomp_reduction_r4(long ptr float) vcomp._vcomp_reduction_r4
@
stub
_vcomp_reduction_r8
@
cdecl _vcomp_reduction_r8(long ptr double) vcomp.
_vcomp_reduction_r8
@ cdecl _vcomp_reduction_u1(long ptr long) vcomp._vcomp_reduction_u1
@ cdecl _vcomp_reduction_u2(long ptr long) vcomp._vcomp_reduction_u2
@ cdecl _vcomp_reduction_u4(long ptr long) vcomp._vcomp_reduction_u4
...
...
dlls/vcomp120/vcomp120.spec
View file @
0c4c6d60
...
...
@@ -79,7 +79,7 @@
@ cdecl _vcomp_reduction_i4(long ptr long) vcomp._vcomp_reduction_i4
@ cdecl _vcomp_reduction_i8(long ptr int64) vcomp._vcomp_reduction_i8
@ cdecl _vcomp_reduction_r4(long ptr float) vcomp._vcomp_reduction_r4
@
stub
_vcomp_reduction_r8
@
cdecl _vcomp_reduction_r8(long ptr double) vcomp.
_vcomp_reduction_r8
@ cdecl _vcomp_reduction_u1(long ptr long) vcomp._vcomp_reduction_u1
@ cdecl _vcomp_reduction_u2(long ptr long) vcomp._vcomp_reduction_u2
@ cdecl _vcomp_reduction_u4(long ptr long) vcomp._vcomp_reduction_u4
...
...
dlls/vcomp140/vcomp140.spec
View file @
0c4c6d60
...
...
@@ -79,7 +79,7 @@
@ cdecl _vcomp_reduction_i4(long ptr long) vcomp._vcomp_reduction_i4
@ cdecl _vcomp_reduction_i8(long ptr int64) vcomp._vcomp_reduction_i8
@ cdecl _vcomp_reduction_r4(long ptr float) vcomp._vcomp_reduction_r4
@
stub
_vcomp_reduction_r8
@
cdecl _vcomp_reduction_r8(long ptr double) vcomp.
_vcomp_reduction_r8
@ cdecl _vcomp_reduction_u1(long ptr long) vcomp._vcomp_reduction_u1
@ cdecl _vcomp_reduction_u2(long ptr long) vcomp._vcomp_reduction_u2
@ cdecl _vcomp_reduction_u4(long ptr long) vcomp._vcomp_reduction_u4
...
...
dlls/vcomp90/vcomp90.spec
View file @
0c4c6d60
...
...
@@ -78,7 +78,7 @@
@ cdecl _vcomp_reduction_i4(long ptr long) vcomp._vcomp_reduction_i4
@ cdecl _vcomp_reduction_i8(long ptr int64) vcomp._vcomp_reduction_i8
@ cdecl _vcomp_reduction_r4(long ptr float) vcomp._vcomp_reduction_r4
@
stub
_vcomp_reduction_r8
@
cdecl _vcomp_reduction_r8(long ptr double) vcomp.
_vcomp_reduction_r8
@ cdecl _vcomp_reduction_u1(long ptr long) vcomp._vcomp_reduction_u1
@ cdecl _vcomp_reduction_u2(long ptr long) vcomp._vcomp_reduction_u2
@ cdecl _vcomp_reduction_u4(long ptr long) vcomp._vcomp_reduction_u4
...
...
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