Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
ccan
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mirror
ccan
Commits
9722c4a4
Commit
9722c4a4
authored
Sep 06, 2015
by
Andrew Jeffery
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strgrp: Optionally include OpenMP pragma
parent
9e207bca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
ccan/strgrp/_info
ccan/strgrp/_info
+7
-0
ccan/strgrp/strgrp.c
ccan/strgrp/strgrp.c
+4
-0
No files found.
ccan/strgrp/_info
View file @
9722c4a4
...
...
@@ -103,5 +103,12 @@ int main(int argc, char *argv[]) {
return 0;
}
#if HAVE_OPENMP
if (strcmp(argv[1], "cflags") == 0) {
printf("-fopenmp\n");
return 0;
}
#endif
return 1;
}
ccan/strgrp/strgrp.c
View file @
9722c4a4
...
...
@@ -25,6 +25,7 @@
#include "ccan/tal/tal.h"
#include "ccan/tal/str/str.h"
#include "strgrp.h"
#include "config.h"
typedef
darray
(
struct
strgrp_grp
*
)
darray_grp
;
typedef
darray
(
struct
strgrp_item
*
)
darray_item
;
...
...
@@ -224,7 +225,10 @@ grp_for(struct strgrp *const ctx, const char *const str) {
}
}
int
i
;
// Keep ccanlint happy in reduced feature mode
#if HAVE_OPENMP
#pragma omp parallel for schedule(dynamic)
#endif
for
(
i
=
0
;
i
<
ctx
->
n_grps
;
i
++
)
{
ctx
->
scores
[
i
].
grp
=
darray_item
(
ctx
->
grps
,
i
);
const
bool
ss
=
should_grp_score
(
ctx
,
ctx
->
scores
[
i
].
grp
,
str
);
...
...
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