Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
22d1a432
Commit
22d1a432
authored
12 years ago
by
Pedro Gonnet
Browse files
Options
Downloads
Patches
Plain Diff
make splitsize variable.
Former-commit-id: d1b9c1bdc5509ad7348ff490f8a5f74d73a6dffc
parent
1850e55b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
runner.h
+1
-1
1 addition, 1 deletion
runner.h
space.c
+3
-0
3 additions, 0 deletions
space.c
space.h
+4
-1
4 additions, 1 deletion
space.h
test.c
+6
-1
6 additions, 1 deletion
test.c
with
14 additions
and
3 deletions
runner.h
+
1
−
1
View file @
22d1a432
...
...
@@ -96,7 +96,7 @@ extern int runner_counter[ runner_counter_count ];
/* Histogram functions. */
#define runner_hist_a 1.0
#define runner_hist_b
6
.0
#define runner_hist_b
10
.0
#define runner_hist_N 99
long
long
int
runner_hist_bins
[
runner_hist_N
];
#define runner_hist_hit( x ) __sync_add_and_fetch( &runner_hist_bins[ (int)fmax( 0.0 , fmin( runner_hist_N-1 , ((x) - runner_hist_a) / (runner_hist_b - runner_hist_a) * runner_hist_N ) ) ] , 1 )
...
...
This diff is collapsed.
Click to expand it.
space.c
+
3
−
0
View file @
22d1a432
...
...
@@ -39,6 +39,9 @@
/* Convert cell location to ID. */
#define cell_getid( cdim , i , j , k ) ( (int)(k) + (cdim)[2]*( (int)(j) + (cdim)[1]*(int)(i) ) )
/* Split size. */
int
space_splitsize
=
space_splitsize_default
;
/* Task type names. */
const
char
*
taskID_names
[
tid_count
]
=
{
"none"
,
"sort"
,
"self"
,
"pair"
,
"sub"
};
...
...
This diff is collapsed.
Click to expand it.
space.h
+
4
−
1
View file @
22d1a432
...
...
@@ -24,11 +24,14 @@
#define space_maxdepth 10
#define space_cellallocchunk 1000
#define space_splitratio 0.875
#define space_splitsize
800
#define space_splitsize
_default
800
#define task_maxwait 3
#define task_maxunlock 39
/* Split size. */
extern
int
space_splitsize
;
/* Map shift vector to sortlist. */
extern
const
int
sortlistID
[
27
];
...
...
This diff is collapsed.
Click to expand it.
test.c
+
6
−
1
View file @
22d1a432
...
...
@@ -491,7 +491,7 @@ int main ( int argc , char *argv[] ) {
bzero
(
&
s
,
sizeof
(
struct
space
)
);
/* Parse the options. */
while
(
(
c
=
getopt
(
argc
,
argv
,
"a:b:p:d:N:c:h:v:m:s:t:q:r:i:m:"
)
)
!=
-
1
)
while
(
(
c
=
getopt
(
argc
,
argv
,
"a:b:p:d:N:c:h:v:m:s:t:q:r:i:m:
z:
"
)
)
!=
-
1
)
switch
(
c
)
{
case
'N'
:
if
(
sscanf
(
optarg
,
"%d"
,
&
N
)
!=
1
)
...
...
@@ -568,6 +568,11 @@ int main ( int argc , char *argv[] ) {
error
(
"Error parsing number of threads."
);
omp_set_num_threads
(
nr_threads
);
break
;
case
'z'
:
if
(
sscanf
(
optarg
,
"%d"
,
&
space_splitsize
)
!=
1
)
error
(
"Error parsing split size."
);
printf
(
"main: split size set to %i.
\n
"
,
space_splitsize
);
break
;
case
'?'
:
error
(
"Unknown option."
);
break
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment