Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
marekkokot committed Feb 8, 2017
1 parent f5fbff6 commit 9726a71
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
11 changes: 6 additions & 5 deletions kmer_counter/first_dispatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Date : 2017-01-28
#include "defs.h"
#include "timer.h"
#include <thread>
#include <array>
#include "asmlib_wrapper.h"
#include "intr_copy.h"

Expand Down Expand Up @@ -101,7 +102,7 @@ class CRangeQueue
template <typename KMER_T, typename COUNTER_TYPE>
void pierwsze_kolko_etap1(uint32_t th_id, KMER_T *kmers, uint64 n_recs, uint32_t n_threads,
// uint64_t per_thread, std::vector<ALIGN_ARRAY COUNTER_TYPE[256]> &histos,
uint64_t per_thread, std::vector<COUNTER_TYPE[256]> &histos,
uint64_t per_thread, std::vector<std::array<COUNTER_TYPE, 256>> &histos,
uint32 byte, CRangeQueue& rq)
//(std::thread([th_id, kmers, n_recs, n_threads, per_thread, &histos, byte]
{
Expand Down Expand Up @@ -197,10 +198,10 @@ template <typename KMER_T, typename COUNTER_TYPE>
void pierwsze_kolko_etap2(uint32_t th_id, KMER_T *kmers, KMER_T* tmp,
uint64 n_recs, uint32_t n_threads, uint64_t per_thread, uint32 byte,
// std::vector<ALIGN_ARRAY COUNTER_TYPE[256]> &histos,
std::vector<COUNTER_TYPE[256]> &histos,
std::vector<std::array<COUNTER_TYPE, 256>> &histos,
std::vector<uchar*> &_raw_buffers,
// std::vector<ALIGN_ARRAY COUNTER_TYPE[256]> &threads_histos,
std::vector<COUNTER_TYPE[256]> &threads_histos,
std::vector<std::array<COUNTER_TYPE, 256>> &threads_histos,
CMemoryPool* pmm_radix_buf,
CRangeQueue& rq)
//std::thread([th_id, kmers, tmp, n_recs, n_threads, per_thread, byte,
Expand Down Expand Up @@ -379,10 +380,10 @@ template <typename KMER_T, typename COUNTER_TYPE>
void pierwsze_kolko_etap3(uint32_t th_id, KMER_T *kmers, KMER_T* tmp,
uint64 n_recs, uint32_t n_threads, uint64_t per_thread, uint32 byte,
// std::vector<ALIGN_ARRAY COUNTER_TYPE[256]> &histos,
std::vector<COUNTER_TYPE[256]> &histos,
std::vector<std::array<COUNTER_TYPE, 256>> &histos,
std::vector<uchar*> &_raw_buffers,
// std::vector<ALIGN_ARRAY COUNTER_TYPE[256]> &threads_histos,
std::vector<COUNTER_TYPE[256]> &threads_histos,
std::vector<std::array<COUNTER_TYPE, 256>> &threads_histos,
CMemoryPool* pmm_radix_buf,
CRangeQueue& rq)

Expand Down
4 changes: 2 additions & 2 deletions kmer_counter/radix.h
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ namespace RadixSort
uint64 per_thread = n_recs / n_threads;

std::vector<std::thread> threads;
std::vector<COUNTER_TYPE[256]> histos(n_threads);
std::vector<std::array<COUNTER_TYPE,256>> histos(n_threads);
ALIGN_ARRAY COUNTER_TYPE globalHisto[256] = {};
for (uint32_t th_id = 0; th_id < n_threads; ++th_id)
{
Expand Down Expand Up @@ -577,7 +577,7 @@ namespace RadixSort
}

std::vector<uchar*> _raw_buffers(n_threads);
std::vector<COUNTER_TYPE[256]> threads_histos(n_threads);
std::vector<std::array<COUNTER_TYPE,256>> threads_histos(n_threads);

for (uint32_t th_id = 0; th_id < n_threads; ++th_id)
{
Expand Down
4 changes: 2 additions & 2 deletions kmer_counter/raduls_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ namespace RadulsSort

std::vector<std::thread> threads;
// std::vector<ALIGN_ARRAY COUNTER_TYPE[256]> histos(MAGIC_NUMBER * n_threads);
std::vector<COUNTER_TYPE[256]> histos(MAGIC_NUMBER * n_threads);
std::vector<std::array<COUNTER_TYPE, 256>> histos(MAGIC_NUMBER * n_threads);
ALIGN_ARRAY COUNTER_TYPE globalHisto[256] = {};
for (uint32_t th_id = 0; th_id < n_threads; ++th_id)
{
Expand Down Expand Up @@ -596,7 +596,7 @@ namespace RadulsSort

std::vector<uchar*> _raw_buffers(MAGIC_NUMBER * n_threads);
// std::vector<ALIGN_ARRAY COUNTER_TYPE[256]> threads_histos(MAGIC_NUMBER * n_threads);
std::vector<COUNTER_TYPE[256]> threads_histos(MAGIC_NUMBER * n_threads);
std::vector<std::array<COUNTER_TYPE, 256>> threads_histos(MAGIC_NUMBER * n_threads);

for (uint32_t th_id = 0; th_id < n_threads; ++th_id)
{
Expand Down
Binary file removed kmer_counter/x64/Release/kmer.obj
Binary file not shown.

0 comments on commit 9726a71

Please sign in to comment.