Skip to content
Snippets Groups Projects
Commit 879f437f authored by Martin Larralde's avatar Martin Larralde
Browse files

Add `_utils.hpp` with relevant C++ code to compile without OpenMP

parent df59a5ba
No related branches found
Tags v0.1.2
No related merge requests found
#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;
}
#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
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
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment