File: small_k_buf.h

package info (click to toggle)
kmc 3.2.4%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,716 kB
  • sloc: cpp: 38,308; python: 664; makefile: 216; perl: 179; sh: 34
file content (29 lines) | stat: -rw-r--r-- 601 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
  This file is a part of KMC software distributed under GNU GPL 3 licence.
  The homepage of the KMC project is http://sun.aei.polsl.pl/kmc
  
  Authors: Sebastian Deorowicz, Agnieszka Debudaj-Grabysz, Marek Kokot
  
  Version: 3.2.4
  Date   : 2017-01-28
*/

#ifndef _SMALL_K_BUF
#define _SMALL_K_BUF

#include "defs.h"

template<typename COUNTER_TYPE>
struct CSmallKBuf
{
	COUNTER_TYPE* buf;
	void Store(uint64 index, uchar* _buf, uint32& buf_pos, uint64 counter_size)
	{
		for (uint64 j = 0; j < counter_size; ++j)
			_buf[buf_pos++] = (buf[index] >> (j * 8)) & 0xFF;
	}
};

#endif

// ***** EOF