Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
PyFastANI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Martin Larralde
PyFastANI
Commits
879f437f
Commit
879f437f
authored
3 years ago
by
Martin Larralde
Browse files
Options
Downloads
Patches
Plain Diff
Add `_utils.hpp` with relevant C++ code to compile without OpenMP
parent
df59a5ba
No related branches found
Branches containing commit
Tags
v0.1.2
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
pyfastani/_utils.cpp
+26
-0
26 additions, 0 deletions
pyfastani/_utils.cpp
pyfastani/_utils.hpp
+25
-0
25 additions, 0 deletions
pyfastani/_utils.hpp
pyfastani/_utils.pxd
+17
-0
17 additions, 0 deletions
pyfastani/_utils.pxd
with
68 additions
and
0 deletions
pyfastani/_utils.cpp
0 → 100644
+
26
−
0
View file @
879f437f
#include
<iostream>
#include
<ctime>
#include
<chrono>
#include
<functional>
#include
"_utils.hpp"
skch
::
Map
*
new_map_with_result_vector
(
const
skch
::
Parameters
&
p
,
const
skch
::
Sketch
&
refsketch
,
uint64_t
&
totalQueryFragments
,
int
queryno
,
skch
::
MappingResultsVector_t
&
r
)
{
auto
fn
=
std
::
bind
(
skch
::
Map
::
insertL2ResultsToVec
,
std
::
ref
(
r
),
std
::
placeholders
::
_1
);
return
new
skch
::
Map
(
p
,
refsketch
,
totalQueryFragments
,
queryno
,
fn
);
}
int
omp_get_thread_num
(
void
)
{
return
0
;
}
int
omp_get_num_threads
(
void
)
{
return
1
;
}
This diff is collapsed.
Click to expand it.
pyfastani/_utils.hpp
0 → 100644
+
25
−
0
View file @
879f437f
#ifndef __UTILS_HPP
#define __UTILS_HPP
#include
"map/include/computeMap.hpp"
#include
<stdint.h>
#include
<functional>
#include
"map/include/base_types.hpp"
#include
"map/include/computeMap.hpp"
skch
::
Map
*
new_map_with_result_vector
(
const
skch
::
Parameters
&
p
,
const
skch
::
Sketch
&
refsketch
,
uint64_t
&
totalQueryFragments
,
int
queryno
,
skch
::
MappingResultsVector_t
&
r
);
// not needed anywhere except in `cgi::correctRefGenomeIds`
// so we can just patch them
extern
int
omp_get_thread_num
(
void
);
extern
int
omp_get_num_threads
(
void
);
#endif
This diff is collapsed.
Click to expand it.
pyfastani/_utils.pxd
0 → 100644
+
17
−
0
View file @
879f437f
from
libc.stdint
cimport
uint64_t
from
fastani.map.base_types
cimport
MappingResultsVector_t
from
fastani.map.compute_map
cimport
Map
from
fastani.map.map_parameters
cimport
Parameters
from
fastani.map.win_sketch
cimport
Sketch
cdef
extern
from
"
_utils.hpp
"
nogil
:
Map
*
new_map_with_result_vector
(
const
Parameters
&
p
,
const
Sketch
&
refsketch
,
uint64_t
&
totalQueryFragments
,
int
queryno
,
MappingResultsVector_t
&
r
)
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