[med-svn] [kmc] 05/15: patches

Sascha Steinbiss sascha-guest at moszumanska.debian.org
Mon Aug 24 21:25:07 UTC 2015


This is an automated email from the git hooks/post-receive script.

sascha-guest pushed a commit to branch master
in repository kmc.

commit 13afcd8ed55a55223fe883bcb125d5d67d28f61c
Author: Sascha Steinbiss <sascha at steinbiss.name>
Date:   Mon Aug 24 19:20:04 2015 +0000

    patches
---
 ...-libz2-include-statements-to-native-debian-libs |  40 ++---
 ...hange-kmc-zlib-and-libz2-to-deb-zlib-and-libbz2 |  20 +--
 .../remove-all-zlib-libz2-include-statements       |  20 +--
 .../patches/remove-call-to-asmlib-sub-in-kbsorter  |  16 +-
 debian/patches/remove-references-to-asmlib         |  42 ++---
 .../patches/remove-use-of-asmlib-subroutines.patch | 198 ++++++++++-----------
 debian/patches/series                              |  10 +-
 7 files changed, 172 insertions(+), 174 deletions(-)

diff --git a/debian/patches/change-all-zlib-libz2-include-statements-to-native-debian-libs b/debian/patches/change-all-zlib-libz2-include-statements-to-native-debian-libs
index 0355fbe..212aa14 100644
--- a/debian/patches/change-all-zlib-libz2-include-statements-to-native-debian-libs
+++ b/debian/patches/change-all-zlib-libz2-include-statements-to-native-debian-libs
@@ -3,28 +3,28 @@ This patch alters the include statments for these libraries,
 using the debian libs instead.--- a/kmer_counter/fastq_reader.h
 +++ b/kmer_counter/fastq_reader.h
 @@ -16,8 +16,8 @@
- #include <stdio.h>
- #include <iostream>
- 
--#include "libs/zlib.h"
--#include "libs/bzlib.h"
-+#include "zlib.h"
-+#include "bzlib.h"
- 
- 
- using namespace std;
+ #include <stdio.h>
+ #include <iostream>
+ 
+-#include "libs/zlib.h"
+-#include "libs/bzlib.h"
++#include "zlib.h"
++#include "bzlib.h"
+ 
+ 
+ using namespace std;
 Index: b/kmer_counter/fastq_reader.h
 ===================================================================
 --- a/kmer_counter/fastq_reader.h
 +++ b/kmer_counter/fastq_reader.h
 @@ -16,8 +16,8 @@
- #include <stdio.h>
- #include <iostream>
- 
--#include "libs/zlib.h"
--#include "libs/bzlib.h"
-+#include "zlib.h"
-+#include "bzlib.h"
- 
- 
- using namespace std;
+ #include <stdio.h>
+ #include <iostream>
+ 
+-#include "libs/zlib.h"
+-#include "libs/bzlib.h"
++#include "zlib.h"
++#include "bzlib.h"
+ 
+ 
+ using namespace std;
diff --git a/debian/patches/change-kmc-zlib-and-libz2-to-deb-zlib-and-libbz2 b/debian/patches/change-kmc-zlib-and-libz2-to-deb-zlib-and-libbz2
index 80091d2..af9f4c8 100644
--- a/debian/patches/change-kmc-zlib-and-libz2-to-deb-zlib-and-libbz2
+++ b/debian/patches/change-kmc-zlib-and-libz2-to-deb-zlib-and-libbz2
@@ -6,13 +6,13 @@ Index: b/kmer_counter/fastq_reader.h
 --- a/kmer_counter/fastq_reader.h
 +++ b/kmer_counter/fastq_reader.h
 @@ -16,8 +16,8 @@
- #include <stdio.h>
- #include <iostream>
- 
--#include "libs/zlib.h"
--#include "libs/bzlib.h"
-+#include "zlib.h"
-+#include "bzlib.h"
- 
- 
- using namespace std;
+ #include <stdio.h>
+ #include <iostream>
+ 
+-#include "libs/zlib.h"
+-#include "libs/bzlib.h"
++#include "zlib.h"
++#include "bzlib.h"
+ 
+ 
+ using namespace std;
diff --git a/debian/patches/remove-all-zlib-libz2-include-statements b/debian/patches/remove-all-zlib-libz2-include-statements
index 019c8b3..c4da373 100644
--- a/debian/patches/remove-all-zlib-libz2-include-statements
+++ b/debian/patches/remove-all-zlib-libz2-include-statements
@@ -3,13 +3,13 @@ Index: b/kmer_counter/fastq_reader.h
 --- a/kmer_counter/fastq_reader.h
 +++ b/kmer_counter/fastq_reader.h
 @@ -16,8 +16,8 @@
- #include <stdio.h>
- #include <iostream>
- 
--#include "libs/zlib.h"
--#include "libs/bzlib.h"
-+#include "zlib.h"
-+#include "bzlib.h"
- 
- 
- using namespace std;
+ #include <stdio.h>
+ #include <iostream>
+ 
+-#include "libs/zlib.h"
+-#include "libs/bzlib.h"
++#include "zlib.h"
++#include "bzlib.h"
+ 
+ 
+ using namespace std;
diff --git a/debian/patches/remove-call-to-asmlib-sub-in-kbsorter b/debian/patches/remove-call-to-asmlib-sub-in-kbsorter
index b085a86..84fd718 100644
--- a/debian/patches/remove-call-to-asmlib-sub-in-kbsorter
+++ b/debian/patches/remove-call-to-asmlib-sub-in-kbsorter
@@ -6,11 +6,11 @@ Index: b/kmer_counter/kb_sorter.h
 --- a/kmer_counter/kb_sorter.h
 +++ b/kmer_counter/kb_sorter.h
 @@ -247,8 +247,6 @@ template <typename KMER_T, unsigned SIZE
- 	uint64 tmp_n_rec;
- 	CMemDiskFile *file;
- 	
--	SetMemcpyCacheLimit(8);
--
- 	// Process bins
- 	while (!bq->completed())
- 	{
+ 	uint64 tmp_n_rec;
+ 	CMemDiskFile *file;
+ 	
+-	SetMemcpyCacheLimit(8);
+-
+ 	// Process bins
+ 	while (!bq->completed())
+ 	{
diff --git a/debian/patches/remove-references-to-asmlib b/debian/patches/remove-references-to-asmlib
index 9ae0eac..ee1ec9a 100644
--- a/debian/patches/remove-references-to-asmlib
+++ b/debian/patches/remove-references-to-asmlib
@@ -11,34 +11,34 @@ Index: b/kmer_counter/kmc.h
 --- a/kmer_counter/kmc.h
 +++ b/kmer_counter/kmc.h
 @@ -29,7 +29,6 @@
- #include "kb_storer.h"
- #include "s_mapper.h"
- #include "splitter.h"
--#include "libs/asmlib.h"
- #include <boost/filesystem.hpp>
- 
- #ifdef DEVELOP_MODE
+ #include "kb_storer.h"
+ #include "s_mapper.h"
+ #include "splitter.h"
+-#include "libs/asmlib.h"
+ #include <boost/filesystem.hpp>
+ 
+ #ifdef DEVELOP_MODE
 Index: b/kmer_counter/mem_disk_file.cpp
 ===================================================================
 --- a/kmer_counter/mem_disk_file.cpp
 +++ b/kmer_counter/mem_disk_file.cpp
 @@ -10,7 +10,6 @@
- */
- 
- #include "mem_disk_file.h"
--#include "libs/asmlib.h"
- 
- //----------------------------------------------------------------------------------
- // Constructor 
+ */
+ 
+ #include "mem_disk_file.h"
+-#include "libs/asmlib.h"
+ 
+ //----------------------------------------------------------------------------------
+ // Constructor 
 Index: b/kmer_counter/radix.h
 ===================================================================
 --- a/kmer_counter/radix.h
 +++ b/kmer_counter/radix.h
 @@ -16,7 +16,6 @@
- #include <iostream>
- #include <omp.h>
- #include <algorithm>
--#include "libs/asmlib.h"
- #include "defs.h"
- #include "queues.h"
- #include <boost/static_assert.hpp>
+ #include <iostream>
+ #include <omp.h>
+ #include <algorithm>
+-#include "libs/asmlib.h"
+ #include "defs.h"
+ #include "queues.h"
+ #include <boost/static_assert.hpp>
diff --git a/debian/patches/remove-use-of-asmlib-subroutines.patch b/debian/patches/remove-use-of-asmlib-subroutines.patch
index 22a89fa..79a5bfb 100644
--- a/debian/patches/remove-use-of-asmlib-subroutines.patch
+++ b/debian/patches/remove-use-of-asmlib-subroutines.patch
@@ -6,136 +6,136 @@ Index: b/kmer_counter/defs.h
 --- a/kmer_counter/defs.h
 +++ b/kmer_counter/defs.h
 @@ -73,8 +73,6 @@ typedef float	count_t;
- #define KMER_WORDS		((MAX_K + 31) / 32)
- 
- #ifdef _DEBUG
--#define A_memcpy	memcpy
--#define A_memset	memset
- #endif
- 
- 
+ #define KMER_WORDS		((MAX_K + 31) / 32)
+ 
+ #ifdef _DEBUG
+-#define A_memcpy	memcpy
+-#define A_memset	memset
+ #endif
+ 
+ 
 Index: b/kmer_counter/kb_sorter.h
 ===================================================================
 --- a/kmer_counter/kb_sorter.h
 +++ b/kmer_counter/kb_sorter.h
 @@ -406,7 +406,7 @@ template <unsigned SIZE> void CKmerBinSo
- template <unsigned SIZE> void CKmerBinSorter_Impl<CKmer<SIZE>, SIZE>::FromChildThread(CKmerBinSorter<CKmer<SIZE>, SIZE>& ptr, CKmer<SIZE>* thread_buffer, uint64 size)
- {
- 	lock_guard<mutex> lcx(ptr.expander_mtx);
--	A_memcpy(ptr.buffer_input + ptr.input_pos, thread_buffer, size * sizeof(CKmer<SIZE>));
-+	memcpy(ptr.buffer_input + ptr.input_pos, thread_buffer, size * sizeof(CKmer<SIZE>));
- 	ptr.input_pos += size;
- }
- 
+ template <unsigned SIZE> void CKmerBinSorter_Impl<CKmer<SIZE>, SIZE>::FromChildThread(CKmerBinSorter<CKmer<SIZE>, SIZE>& ptr, CKmer<SIZE>* thread_buffer, uint64 size)
+ {
+ 	lock_guard<mutex> lcx(ptr.expander_mtx);
+-	A_memcpy(ptr.buffer_input + ptr.input_pos, thread_buffer, size * sizeof(CKmer<SIZE>));
++	memcpy(ptr.buffer_input + ptr.input_pos, thread_buffer, size * sizeof(CKmer<SIZE>));
+ 	ptr.input_pos += size;
+ }
+ 
 @@ -1359,4 +1359,4 @@ template <typename KMER_T, unsigned SIZE
- 
- #endif
- 
+ 
+ #endif
+ 
 -// ***** EOF
 \ No newline at end of file
-+// ***** EOF
++// ***** EOF
 Index: b/kmer_counter/kb_storer.cpp
 ===================================================================
 --- a/kmer_counter/kb_storer.cpp
 +++ b/kmer_counter/kb_storer.cpp
 @@ -156,7 +156,7 @@ void CKmerBinStorer::PutBinToTmpFile(uin
- 		{
- 			buf = get<0>(*p);
- 			size = get<1>(*p);
--			A_memcpy(tmp_buff + tmp_buff_pos, buf, size);
-+			memcpy(tmp_buff + tmp_buff_pos, buf, size);
- 			tmp_buff_pos += size;
- 			pmm_bins->free(buf);
- 		}
+ 		{
+ 			buf = get<0>(*p);
+ 			size = get<1>(*p);
+-			A_memcpy(tmp_buff + tmp_buff_pos, buf, size);
++			memcpy(tmp_buff + tmp_buff_pos, buf, size);
+ 			tmp_buff_pos += size;
+ 			pmm_bins->free(buf);
+ 		}
 Index: b/kmer_counter/mem_disk_file.cpp
 ===================================================================
 --- a/kmer_counter/mem_disk_file.cpp
 +++ b/kmer_counter/mem_disk_file.cpp
 @@ -78,7 +78,7 @@ size_t CMemDiskFile::Read(uchar * ptr, s
- 		uint64 pos = 0;
- 		for(auto& p : container)
- 		{
--			A_memcpy(ptr + pos, p.first, p.second);
-+			memcpy(ptr + pos, p.first, p.second);
- 			pos += p.second;
- 			delete[] p.first;
- 		}
+ 		uint64 pos = 0;
+ 		for(auto& p : container)
+ 		{
+-			A_memcpy(ptr + pos, p.first, p.second);
++			memcpy(ptr + pos, p.first, p.second);
+ 			pos += p.second;
+ 			delete[] p.first;
+ 		}
 @@ -97,7 +97,7 @@ size_t CMemDiskFile::Write(const uchar *
- 	if(memory_mode)
- 	{
- 		uchar *buf = new uchar[size * count];
--		A_memcpy(buf, ptr, size * count);
-+		memcpy(buf, ptr, size * count);
- 		container.push_back(make_pair(buf, size * count));
- 		return size * count;
- 	}
+ 	if(memory_mode)
+ 	{
+ 		uchar *buf = new uchar[size * count];
+-		A_memcpy(buf, ptr, size * count);
++		memcpy(buf, ptr, size * count);
+ 		container.push_back(make_pair(buf, size * count));
+ 		return size * count;
+ 	}
 Index: b/kmer_counter/radix.cpp
 ===================================================================
 --- a/kmer_counter/radix.cpp
 +++ b/kmer_counter/radix.cpp
 @@ -72,7 +72,7 @@ void RadixOMP_uint8(uint32 *SourcePtr, u
- 				
- 				++privateByteCounter[byteValue];
- 			}	
--			A_memcpy(&ByteCounter[myID][0], privateByteCounter, sizeof(privateByteCounter));
-+			memcpy(&ByteCounter[myID][0], privateByteCounter, sizeof(privateByteCounter));
- 
- 			#pragma omp barrier
- 
+ 				
+ 				++privateByteCounter[byteValue];
+ 			}	
+-			A_memcpy(&ByteCounter[myID][0], privateByteCounter, sizeof(privateByteCounter));
++			memcpy(&ByteCounter[myID][0], privateByteCounter, sizeof(privateByteCounter));
+ 
+ 			#pragma omp barrier
+ 
 @@ -104,7 +104,7 @@ void RadixOMP_uint8(uint32 *SourcePtr, u
- 			for (private_i = 0; private_i < 256; private_i++)
- 				ByteCounter[myID][private_i] += globalHisto[private_i];
- 
--			A_memcpy(privateByteCounter, &ByteCounter[myID][0], sizeof(privateByteCounter));
-+			memcpy(privateByteCounter, &ByteCounter[myID][0], sizeof(privateByteCounter));
- 		
- 			#pragma omp for schedule(static)
- 			for(i = data_offset; i < SourceSize_in_bytes; i = i + rec_size)
+ 			for (private_i = 0; private_i < 256; private_i++)
+ 				ByteCounter[myID][private_i] += globalHisto[private_i];
+ 
+-			A_memcpy(privateByteCounter, &ByteCounter[myID][0], sizeof(privateByteCounter));
++			memcpy(privateByteCounter, &ByteCounter[myID][0], sizeof(privateByteCounter));
+ 		
+ 			#pragma omp for schedule(static)
+ 			for(i = data_offset; i < SourceSize_in_bytes; i = i + rec_size)
 @@ -199,7 +199,7 @@ template<typename COUNTER_TYPE, typename
- 				byteValue = *(reinterpret_cast<const uint8_t*>(&tempSource[i]) + ByteIndex);
- 				++privateByteCounter[byteValue];
- 			}	
--			A_memcpy(&ByteCounter[myID][0], privateByteCounter, sizeof(privateByteCounter));
-+			memcpy(&ByteCounter[myID][0], privateByteCounter, sizeof(privateByteCounter));
- 
- 			#pragma omp barrier
- 
+ 				byteValue = *(reinterpret_cast<const uint8_t*>(&tempSource[i]) + ByteIndex);
+ 				++privateByteCounter[byteValue];
+ 			}	
+-			A_memcpy(&ByteCounter[myID][0], privateByteCounter, sizeof(privateByteCounter));
++			memcpy(&ByteCounter[myID][0], privateByteCounter, sizeof(privateByteCounter));
+ 
+ 			#pragma omp barrier
+ 
 @@ -230,7 +230,7 @@ template<typename COUNTER_TYPE, typename
- 			for (private_i = 0; private_i < 256; private_i++)
- 				ByteCounter[myID][private_i] += globalHisto[private_i];
- 
--			A_memcpy(privateByteCounter, &ByteCounter[myID][0], sizeof(privateByteCounter));
-+			memcpy(privateByteCounter, &ByteCounter[myID][0], sizeof(privateByteCounter));
- 		
- 
- 			#pragma omp for schedule(static)
+ 			for (private_i = 0; private_i < 256; private_i++)
+ 				ByteCounter[myID][private_i] += globalHisto[private_i];
+ 
+-			A_memcpy(privateByteCounter, &ByteCounter[myID][0], sizeof(privateByteCounter));
++			memcpy(privateByteCounter, &ByteCounter[myID][0], sizeof(privateByteCounter));
+ 		
+ 
+ 			#pragma omp for schedule(static)
 @@ -245,7 +245,7 @@ template<typename COUNTER_TYPE, typename
- 				privateByteCounter[byteValue]++;
- 
- 				if(index_x == (BUFFER_WIDTH -1))
--					A_memcpy ( &tempDest[privateByteCounter[byteValue] - (BUFFER_WIDTH)], &Buffer[byteValue * BUFFER_WIDTH], BUFFER_WIDTH *sizeof(uint64) );
-+					memcpy ( &tempDest[privateByteCounter[byteValue] - (BUFFER_WIDTH)], &Buffer[byteValue * BUFFER_WIDTH], BUFFER_WIDTH *sizeof(uint64) );
- 			} //end_for
- 
- 			INT_TYPE elemInBuffer;
+ 				privateByteCounter[byteValue]++;
+ 
+ 				if(index_x == (BUFFER_WIDTH -1))
+-					A_memcpy ( &tempDest[privateByteCounter[byteValue] - (BUFFER_WIDTH)], &Buffer[byteValue * BUFFER_WIDTH], BUFFER_WIDTH *sizeof(uint64) );
++					memcpy ( &tempDest[privateByteCounter[byteValue] - (BUFFER_WIDTH)], &Buffer[byteValue * BUFFER_WIDTH], BUFFER_WIDTH *sizeof(uint64) );
+ 			} //end_for
+ 
+ 			INT_TYPE elemInBuffer;
 @@ -265,7 +265,7 @@ template<typename COUNTER_TYPE, typename
- 					elemInBuffer = index_stop - index_start;
- 
- 				if(elemInBuffer != 0)
--					A_memcpy ( &tempDest[privateByteCounter[private_i] - elemInBuffer], &Buffer[private_i * BUFFER_WIDTH + (privateByteCounter[private_i] - elemInBuffer)%BUFFER_WIDTH], (elemInBuffer)*sizeof(uint64) );
-+					memcpy ( &tempDest[privateByteCounter[private_i] - elemInBuffer], &Buffer[private_i * BUFFER_WIDTH + (privateByteCounter[private_i] - elemInBuffer)%BUFFER_WIDTH], (elemInBuffer)*sizeof(uint64) );
- 			
- 			}
- 			#pragma omp barrier
+ 					elemInBuffer = index_stop - index_start;
+ 
+ 				if(elemInBuffer != 0)
+-					A_memcpy ( &tempDest[privateByteCounter[private_i] - elemInBuffer], &Buffer[private_i * BUFFER_WIDTH + (privateByteCounter[private_i] - elemInBuffer)%BUFFER_WIDTH], (elemInBuffer)*sizeof(uint64) );
++					memcpy ( &tempDest[privateByteCounter[private_i] - elemInBuffer], &Buffer[private_i * BUFFER_WIDTH + (privateByteCounter[private_i] - elemInBuffer)%BUFFER_WIDTH], (elemInBuffer)*sizeof(uint64) );
+ 			
+ 			}
+ 			#pragma omp barrier
 Index: b/kmer_counter/kmc.h
 ===================================================================
 --- a/kmer_counter/kmc.h
 +++ b/kmer_counter/kmc.h
 @@ -164,7 +164,6 @@ template <typename KMER_T, unsigned SIZE
- 
- 	initialized = true; 
- 
--	SetMemcpyCacheLimit(8);			// Sets the asmlib's memcpy function to make copy without use of cache memory
- }
- 
- //----------------------------------------------------------------------------------
+ 
+ 	initialized = true; 
+ 
+-	SetMemcpyCacheLimit(8);			// Sets the asmlib's memcpy function to make copy without use of cache memory
+ }
+ 
+ //----------------------------------------------------------------------------------
diff --git a/debian/patches/series b/debian/patches/series
index b081585..2a1d604 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,6 +1,4 @@
-debian-dependent-makefile.patch
-remove-references-to-asmlib
-remove-use-of-asmlib-subroutines.patch
-change-kmc-zlib-and-libz2-to-deb-zlib-and-libbz2
-remove-call-to-asmlib-sub-in-kbsorter
-remove-embedded-libraries-from-makefile
+disable-asmlib
+use-shared-libs
+allow-dry-clean
+hardening

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/kmc.git



More information about the debian-med-commit mailing list