From 37790795307d2abaa4b40ab086f9e2d0d2bdc92a Mon Sep 17 00:00:00 2001 From: Zengtudor Date: Thu, 19 Sep 2024 22:57:08 +0800 Subject: [PATCH] update --- src/main.cpp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 1c6e9cd..7535571 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -28,7 +28,7 @@ //最大DNA序列长度 const size_t MAX_SIZE_PER_DNA = 5e4+5; -void reverseComplement(char *begin, char *end) //注意这里使用引用DNA sequence,避免拷贝开销 +void reverseComplement(char *begin, char *end) //注意end是开区间,不能访问end { static const std::unordered_map complement = { //这里使用查表的方式大大提高CPU速度,因为if分支CPU不容易命中缓存,需要使用查表加速 {'A', 'T'}, {'a', 'T'}, @@ -155,19 +155,7 @@ int main() Spent chunk_write_spent(zt::fmt("write_chunk_id:[",chunk_id,"] , ","[Wrote bytes] ",NAME_VALUE(start_pos))); output_file_stream.write(buf.data(), start_pos); } - // zt::print("[Wrote bytes] ",NAME_VALUE(start_pos),"\n"); - // const std::string_view suffix("\n"); //设置一个每个DNA序列结尾的字符,这里是以\n换行来结尾 - - // if (lines == true){ - // // output_file_stream << reverseComplement(buf) << endl; - // reverseComplement(buf,buf_len); - // } - // // buf+=suffix; - // for(std::remove_const_t i=0;i