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
c34c9b4f
Commit
c34c9b4f
authored
Jul 20, 2015
by
Sebastian Lackner
Committed by
Alexandre Julliard
Jul 20, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vcomp: Implement _vcomp_for_static_init.
parent
02054a75
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
3 deletions
+66
-3
main.c
dlls/vcomp/main.c
+63
-0
vcomp.spec
dlls/vcomp/vcomp.spec
+1
-1
vcomp100.spec
dlls/vcomp100/vcomp100.spec
+1
-1
vcomp90.spec
dlls/vcomp90/vcomp90.spec
+1
-1
No files found.
dlls/vcomp/main.c
View file @
c34c9b4f
...
@@ -412,6 +412,69 @@ void CDECL _vcomp_for_static_simple_init(unsigned int first, unsigned int last,
...
@@ -412,6 +412,69 @@ void CDECL _vcomp_for_static_simple_init(unsigned int first, unsigned int last,
*
end
=
*
begin
+
(
per_thread
-
1
)
*
step
;
*
end
=
*
begin
+
(
per_thread
-
1
)
*
step
;
}
}
void
CDECL
_vcomp_for_static_init
(
int
first
,
int
last
,
int
step
,
int
chunksize
,
unsigned
int
*
loops
,
int
*
begin
,
int
*
end
,
int
*
next
,
int
*
lastchunk
)
{
unsigned
int
iterations
,
num_chunks
,
per_thread
,
remaining
;
struct
vcomp_thread_data
*
thread_data
=
vcomp_init_thread_data
();
struct
vcomp_team_data
*
team_data
=
thread_data
->
team
;
int
num_threads
=
team_data
?
team_data
->
num_threads
:
1
;
int
thread_num
=
thread_data
->
thread_num
;
TRACE
(
"(%d, %d, %d, %d, %p, %p, %p, %p, %p)
\n
"
,
first
,
last
,
step
,
chunksize
,
loops
,
begin
,
end
,
next
,
lastchunk
);
if
(
num_threads
==
1
&&
chunksize
!=
1
)
{
*
loops
=
1
;
*
begin
=
first
;
*
end
=
last
;
*
next
=
0
;
*
lastchunk
=
first
;
return
;
}
if
(
first
==
last
)
{
*
loops
=
!
thread_num
;
if
(
!
thread_num
)
{
*
begin
=
first
;
*
end
=
last
;
*
next
=
0
;
*
lastchunk
=
first
;
}
return
;
}
if
(
step
<=
0
)
{
*
loops
=
0
;
return
;
}
if
(
first
<
last
)
iterations
=
1
+
(
last
-
first
)
/
step
;
else
{
iterations
=
1
+
(
first
-
last
)
/
step
;
step
*=
-
1
;
}
if
(
chunksize
<
1
)
chunksize
=
1
;
num_chunks
=
((
DWORD64
)
iterations
+
chunksize
-
1
)
/
chunksize
;
per_thread
=
num_chunks
/
num_threads
;
remaining
=
num_chunks
-
per_thread
*
num_threads
;
*
loops
=
per_thread
+
(
thread_num
<
remaining
);
*
begin
=
first
+
thread_num
*
chunksize
*
step
;
*
end
=
*
begin
+
(
chunksize
-
1
)
*
step
;
*
next
=
chunksize
*
num_threads
*
step
;
*
lastchunk
=
first
+
(
num_chunks
-
1
)
*
chunksize
*
step
;
}
void
CDECL
_vcomp_for_static_end
(
void
)
void
CDECL
_vcomp_for_static_end
(
void
)
{
{
TRACE
(
"()
\n
"
);
TRACE
(
"()
\n
"
);
...
...
dlls/vcomp/vcomp.spec
View file @
c34c9b4f
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
@ stub _vcomp_for_dynamic_next
@ stub _vcomp_for_dynamic_next
@ stub _vcomp_for_dynamic_next_i8
@ stub _vcomp_for_dynamic_next_i8
@ cdecl _vcomp_for_static_end()
@ cdecl _vcomp_for_static_end()
@
stub _vcomp_for_static_init
@
cdecl _vcomp_for_static_init(long long long long ptr ptr ptr ptr ptr)
@ stub _vcomp_for_static_init_i8
@ stub _vcomp_for_static_init_i8
@ cdecl _vcomp_for_static_simple_init(long long long long ptr ptr)
@ cdecl _vcomp_for_static_simple_init(long long long long ptr ptr)
@ stub _vcomp_for_static_simple_init_i8
@ stub _vcomp_for_static_simple_init_i8
...
...
dlls/vcomp100/vcomp100.spec
View file @
c34c9b4f
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
@ stub _vcomp_for_dynamic_next
@ stub _vcomp_for_dynamic_next
@ stub _vcomp_for_dynamic_next_i8
@ stub _vcomp_for_dynamic_next_i8
@ cdecl _vcomp_for_static_end() vcomp._vcomp_for_static_end
@ cdecl _vcomp_for_static_end() vcomp._vcomp_for_static_end
@
stub
_vcomp_for_static_init
@
cdecl _vcomp_for_static_init(long long long long ptr ptr ptr ptr ptr) vcomp.
_vcomp_for_static_init
@ stub _vcomp_for_static_init_i8
@ stub _vcomp_for_static_init_i8
@ cdecl _vcomp_for_static_simple_init(long long long long ptr ptr) vcomp._vcomp_for_static_simple_init
@ cdecl _vcomp_for_static_simple_init(long long long long ptr ptr) vcomp._vcomp_for_static_simple_init
@ stub _vcomp_for_static_simple_init_i8
@ stub _vcomp_for_static_simple_init_i8
...
...
dlls/vcomp90/vcomp90.spec
View file @
c34c9b4f
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
@ stub _vcomp_for_dynamic_next
@ stub _vcomp_for_dynamic_next
@ stub _vcomp_for_dynamic_next_i8
@ stub _vcomp_for_dynamic_next_i8
@ cdecl _vcomp_for_static_end() vcomp._vcomp_for_static_end
@ cdecl _vcomp_for_static_end() vcomp._vcomp_for_static_end
@
stub
_vcomp_for_static_init
@
cdecl _vcomp_for_static_init(long long long long ptr ptr ptr ptr ptr) vcomp.
_vcomp_for_static_init
@ stub _vcomp_for_static_init_i8
@ stub _vcomp_for_static_init_i8
@ cdecl _vcomp_for_static_simple_init(long long long long ptr ptr) vcomp._vcomp_for_static_simple_init
@ cdecl _vcomp_for_static_simple_init(long long long long ptr ptr) vcomp._vcomp_for_static_simple_init
@ stub _vcomp_for_static_simple_init_i8
@ stub _vcomp_for_static_simple_init_i8
...
...
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