Skip to content
Commits on Source (5)
libmaus2 (2.0.689-1) unstable; urgency=medium
* add isCoding,getStrand and getCDS in GTFData
-- German Tischler-Höhle <germant@miltenyibiotec.de> Wed, 20 Nov 2019 14:13:18 +0100
libmaus2 (2.0.688-1) unstable; urgency=medium
* add get*Info in VCFParser
-- German Tischler-Höhle <germant@miltenyibiotec.de> Tue, 19 Nov 2019 13:53:41 +0100
libmaus2 (2.0.687-1) unstable; urgency=medium
* update default sort block sizes in classes using serialised sorting
* add StreamGetObject in Makefile
* change default sort block size in SerialisingSortingBufferedOutputFile
* add test for SerialisingSortingBufferedOutputFile in testAIO
* reimplement SerialisingSortingBufferedOutput to use fixed size buffer
* add verbose mode for SerialisingMergingReadBack
* add verbose mode for SerialisingSortingBufferedOutputFile
* add lengthUTF8 in UTF8 class
* add CharArrayInputStream/CharArrayOutputStream/CountOutputStream/StreamGetObject plus tests
* add maxdepth field in ExonSubInfo
* add getStrings method in TabEntry
-- German Tischler-Höhle <germant@miltenyibiotec.de> Tue, 12 Nov 2019 17:19:33 +0100
libmaus2 (2.0.686-1) unstable; urgency=medium
* add include statement for stdexcept in PosixFunctions.cpp
-- German Tischler-Höhle <germant@miltenyibiotec.de> Thu, 07 Nov 2019 11:04:53 +0100
libmaus2 (2.0.685-1) unstable; urgency=medium
* add print method in GTFData/Gene/Transcript/Exon
-- German Tischler-Höhle <germant@miltenyibiotec.de> Thu, 07 Nov 2019 10:16:57 +0100
libmaus2 (2.0.684-1) unstable; urgency=medium
* add reset method in IndexBase
......
@%:@! /bin/sh
@%:@ Guess values for system-dependent variables and create Makefiles.
@%:@ Generated by GNU Autoconf 2.69 for libmaus2 2.0.683.
@%:@ Generated by GNU Autoconf 2.69 for libmaus2 2.0.688.
@%:@
@%:@ Report bugs to <tischler@mpi-cbg.de>.
@%:@
......@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='libmaus2'
PACKAGE_TARNAME='libmaus2'
PACKAGE_VERSION='2.0.683'
PACKAGE_STRING='libmaus2 2.0.683'
PACKAGE_VERSION='2.0.688'
PACKAGE_STRING='libmaus2 2.0.688'
PACKAGE_BUGREPORT='tischler@mpi-cbg.de'
PACKAGE_URL='https://github.com/gt1/libmaus2'
 
......@@ -1568,7 +1568,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures libmaus2 2.0.683 to adapt to many kinds of systems.
\`configure' configures libmaus2 2.0.688 to adapt to many kinds of systems.
 
Usage: $0 [OPTION]... [VAR=VALUE]...
 
......@@ -1640,7 +1640,7 @@ fi
 
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of libmaus2 2.0.683:";;
short | recursive ) echo "Configuration of libmaus2 2.0.688:";;
esac
cat <<\_ACEOF
 
......@@ -1802,7 +1802,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
libmaus2 configure 2.0.683
libmaus2 configure 2.0.688
generated by GNU Autoconf 2.69
 
Copyright (C) 2012 Free Software Foundation, Inc.
......@@ -2633,7 +2633,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
 
It was created by libmaus2 $as_me 2.0.683, which was
It was created by libmaus2 $as_me 2.0.688, which was
generated by GNU Autoconf 2.69. Invocation command line was
 
$ $0 $@
......@@ -2981,7 +2981,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
LIBRARY_VERSION=2:683:0
LIBRARY_VERSION=2:688:0
{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring for source in directory ${srcdir}" >&5
$as_echo "$as_me: Configuring for source in directory ${srcdir}" >&6;}
ac_aux_dir=
......@@ -12537,7 +12537,7 @@ fi
 
# Define the identity of the package.
PACKAGE='libmaus2'
VERSION='2.0.683'
VERSION='2.0.688'
 
 
cat >>confdefs.h <<_ACEOF
......@@ -26171,7 +26171,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by libmaus2 $as_me 2.0.683, which was
This file was extended by libmaus2 $as_me 2.0.688, which was
generated by GNU Autoconf 2.69. Invocation command line was
 
CONFIG_FILES = $CONFIG_FILES
......@@ -26238,7 +26238,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
libmaus2 config.status 2.0.683
libmaus2 config.status 2.0.688
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
 
......
@%:@! /bin/sh
@%:@ Guess values for system-dependent variables and create Makefiles.
@%:@ Generated by GNU Autoconf 2.69 for libmaus2 2.0.684.
@%:@ Generated by GNU Autoconf 2.69 for libmaus2 2.0.689.
@%:@
@%:@ Report bugs to <tischler@mpi-cbg.de>.
@%:@
......@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='libmaus2'
PACKAGE_TARNAME='libmaus2'
PACKAGE_VERSION='2.0.684'
PACKAGE_STRING='libmaus2 2.0.684'
PACKAGE_VERSION='2.0.689'
PACKAGE_STRING='libmaus2 2.0.689'
PACKAGE_BUGREPORT='tischler@mpi-cbg.de'
PACKAGE_URL='https://github.com/gt1/libmaus2'
 
......@@ -1568,7 +1568,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures libmaus2 2.0.684 to adapt to many kinds of systems.
\`configure' configures libmaus2 2.0.689 to adapt to many kinds of systems.
 
Usage: $0 [OPTION]... [VAR=VALUE]...
 
......@@ -1640,7 +1640,7 @@ fi
 
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of libmaus2 2.0.684:";;
short | recursive ) echo "Configuration of libmaus2 2.0.689:";;
esac
cat <<\_ACEOF
 
......@@ -1802,7 +1802,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
libmaus2 configure 2.0.684
libmaus2 configure 2.0.689
generated by GNU Autoconf 2.69
 
Copyright (C) 2012 Free Software Foundation, Inc.
......@@ -2633,7 +2633,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
 
It was created by libmaus2 $as_me 2.0.684, which was
It was created by libmaus2 $as_me 2.0.689, which was
generated by GNU Autoconf 2.69. Invocation command line was
 
$ $0 $@
......@@ -2981,7 +2981,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
LIBRARY_VERSION=2:684:0
LIBRARY_VERSION=2:689:0
{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring for source in directory ${srcdir}" >&5
$as_echo "$as_me: Configuring for source in directory ${srcdir}" >&6;}
ac_aux_dir=
......@@ -12537,7 +12537,7 @@ fi
 
# Define the identity of the package.
PACKAGE='libmaus2'
VERSION='2.0.684'
VERSION='2.0.689'
 
 
cat >>confdefs.h <<_ACEOF
......@@ -26171,7 +26171,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by libmaus2 $as_me 2.0.684, which was
This file was extended by libmaus2 $as_me 2.0.689, which was
generated by GNU Autoconf 2.69. Invocation command line was
 
CONFIG_FILES = $CONFIG_FILES
......@@ -26238,7 +26238,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
libmaus2 config.status 2.0.684
libmaus2 config.status 2.0.689
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
 
......
@%:@! /bin/sh
@%:@ Guess values for system-dependent variables and create Makefiles.
@%:@ Generated by GNU Autoconf 2.69 for libmaus2 2.0.684.
@%:@ Generated by GNU Autoconf 2.69 for libmaus2 2.0.689.
@%:@
@%:@ Report bugs to <tischler@mpi-cbg.de>.
@%:@
......@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='libmaus2'
PACKAGE_TARNAME='libmaus2'
PACKAGE_VERSION='2.0.684'
PACKAGE_STRING='libmaus2 2.0.684'
PACKAGE_VERSION='2.0.689'
PACKAGE_STRING='libmaus2 2.0.689'
PACKAGE_BUGREPORT='tischler@mpi-cbg.de'
PACKAGE_URL='https://github.com/gt1/libmaus2'
 
......@@ -1568,7 +1568,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures libmaus2 2.0.684 to adapt to many kinds of systems.
\`configure' configures libmaus2 2.0.689 to adapt to many kinds of systems.
 
Usage: $0 [OPTION]... [VAR=VALUE]...
 
......@@ -1640,7 +1640,7 @@ fi
 
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of libmaus2 2.0.684:";;
short | recursive ) echo "Configuration of libmaus2 2.0.689:";;
esac
cat <<\_ACEOF
 
......@@ -1802,7 +1802,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
libmaus2 configure 2.0.684
libmaus2 configure 2.0.689
generated by GNU Autoconf 2.69
 
Copyright (C) 2012 Free Software Foundation, Inc.
......@@ -2633,7 +2633,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
 
It was created by libmaus2 $as_me 2.0.684, which was
It was created by libmaus2 $as_me 2.0.689, which was
generated by GNU Autoconf 2.69. Invocation command line was
 
$ $0 $@
......@@ -2981,7 +2981,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
LIBRARY_VERSION=2:684:0
LIBRARY_VERSION=2:689:0
{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring for source in directory ${srcdir}" >&5
$as_echo "$as_me: Configuring for source in directory ${srcdir}" >&6;}
ac_aux_dir=
......@@ -12537,7 +12537,7 @@ fi
 
# Define the identity of the package.
PACKAGE='libmaus2'
VERSION='2.0.684'
VERSION='2.0.689'
 
 
cat >>confdefs.h <<_ACEOF
......@@ -26171,7 +26171,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by libmaus2 $as_me 2.0.684, which was
This file was extended by libmaus2 $as_me 2.0.689, which was
generated by GNU Autoconf 2.69. Invocation command line was
 
CONFIG_FILES = $CONFIG_FILES
......@@ -26238,7 +26238,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
libmaus2 config.status 2.0.684
libmaus2 config.status 2.0.689
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
 
......
This diff is collapsed.
......@@ -4,7 +4,7 @@ m4trace:aclocal.m4:1460: -1- m4_include([m4/ltoptions.m4])
m4trace:aclocal.m4:1461: -1- m4_include([m4/ltsugar.m4])
m4trace:aclocal.m4:1462: -1- m4_include([m4/ltversion.m4])
m4trace:aclocal.m4:1463: -1- m4_include([m4/lt~obsolete.m4])
m4trace:configure.ac:1: -1- AC_INIT([libmaus2], [2.0.684], [tischler@mpi-cbg.de], [libmaus2], [https://github.com/gt1/libmaus2])
m4trace:configure.ac:1: -1- AC_INIT([libmaus2], [2.0.689], [tischler@mpi-cbg.de], [libmaus2], [https://github.com/gt1/libmaus2])
m4trace:configure.ac:1: -1- m4_pattern_forbid([^_?A[CHUM]_])
m4trace:configure.ac:1: -1- m4_pattern_forbid([_AC_])
m4trace:configure.ac:1: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
......
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for libmaus2 2.0.684.
# Generated by GNU Autoconf 2.69 for libmaus2 2.0.689.
#
# Report bugs to <tischler@mpi-cbg.de>.
#
......@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='libmaus2'
PACKAGE_TARNAME='libmaus2'
PACKAGE_VERSION='2.0.684'
PACKAGE_STRING='libmaus2 2.0.684'
PACKAGE_VERSION='2.0.689'
PACKAGE_STRING='libmaus2 2.0.689'
PACKAGE_BUGREPORT='tischler@mpi-cbg.de'
PACKAGE_URL='https://github.com/gt1/libmaus2'
 
......@@ -1568,7 +1568,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures libmaus2 2.0.684 to adapt to many kinds of systems.
\`configure' configures libmaus2 2.0.689 to adapt to many kinds of systems.
 
Usage: $0 [OPTION]... [VAR=VALUE]...
 
......@@ -1640,7 +1640,7 @@ fi
 
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of libmaus2 2.0.684:";;
short | recursive ) echo "Configuration of libmaus2 2.0.689:";;
esac
cat <<\_ACEOF
 
......@@ -1802,7 +1802,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
libmaus2 configure 2.0.684
libmaus2 configure 2.0.689
generated by GNU Autoconf 2.69
 
Copyright (C) 2012 Free Software Foundation, Inc.
......@@ -2633,7 +2633,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
 
It was created by libmaus2 $as_me 2.0.684, which was
It was created by libmaus2 $as_me 2.0.689, which was
generated by GNU Autoconf 2.69. Invocation command line was
 
$ $0 $@
......@@ -2981,7 +2981,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
LIBRARY_VERSION=2:684:0
LIBRARY_VERSION=2:689:0
{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring for source in directory ${srcdir}" >&5
$as_echo "$as_me: Configuring for source in directory ${srcdir}" >&6;}
ac_aux_dir=
......@@ -12537,7 +12537,7 @@ fi
 
# Define the identity of the package.
PACKAGE='libmaus2'
VERSION='2.0.684'
VERSION='2.0.689'
 
 
cat >>confdefs.h <<_ACEOF
......@@ -26171,7 +26171,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by libmaus2 $as_me 2.0.684, which was
This file was extended by libmaus2 $as_me 2.0.689, which was
generated by GNU Autoconf 2.69. Invocation command line was
 
CONFIG_FILES = $CONFIG_FILES
......@@ -26238,7 +26238,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
libmaus2 config.status 2.0.684
libmaus2 config.status 2.0.689
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
 
......
AC_INIT(libmaus2,2.0.684,[tischler@mpi-cbg.de],[libmaus2],[https://github.com/gt1/libmaus2])
LIBRARY_VERSION=2:684:0
AC_INIT(libmaus2,2.0.689,[tischler@mpi-cbg.de],[libmaus2],[https://github.com/gt1/libmaus2])
LIBRARY_VERSION=2:689:0
AC_MSG_NOTICE([Configuring for source in directory ${srcdir}])
AC_CANONICAL_SYSTEM
AC_CANONICAL_HOST
......
libmaus2 (2.0.689-1) unstable; urgency=medium
* New upstream version
* Set upstream metadata fields: Bug-Submit.
-- Andreas Tille <tille@debian.org> Sun, 01 Dec 2019 08:48:47 +0100
libmaus2 (2.0.684-1) unstable; urgency=medium
* Team upload.
......
Registry:
- Name: conda:bioconda
Entry: libmaus2
- Name: OMICtools
Entry: NA
- Name: bio.tools
Entry: libmaus
Comment: No refereral to a version 2
\ No newline at end of file
- Name: conda:bioconda
Entry: libmaus2
- Name: OMICtools
Entry: NA
- Name: bio.tools
Entry: libmaus
Comment: No refereral to a version 2
Bug-Submit: tischler@mpi-cbg.de
......@@ -1320,7 +1320,8 @@ libmaus2util_include_HEADERS=\
libmaus2/util/Base64.hpp \
libmaus2/util/AutoArrayUInt8TBaseAllocator.hpp \
libmaus2/util/AutoArrayUInt8TBaseTypeInfo.hpp \
libmaus2/util/DirectoryStructure.hpp
libmaus2/util/DirectoryStructure.hpp \
libmaus2/util/StreamGetObject.hpp
libmaus2uint_includedir=$(includedir)/libmaus2/uint
libmaus2uint_include_HEADERS=\
......@@ -1439,8 +1440,14 @@ libmaus2aio_include_HEADERS=\
libmaus2/aio/MemoryBackedOutputStreamBuffer.hpp \
libmaus2/aio/MemoryBackedOutputStream.hpp \
libmaus2/aio/SkipConcatInputStream.hpp \
libmaus2/aio/SkipConcatInputStreamBuffer.hpp
libmaus2/aio/SkipConcatInputStreamBuffer.hpp \
libmaus2/aio/CountOutputStreamBuffer.hpp \
libmaus2/aio/CountOutputStream.hpp \
libmaus2/aio/CharArrayInputStreamBuffer.hpp \
libmaus2/aio/CharArrayInputStream.hpp \
libmaus2/aio/CharArrayOutputStreamBuffer.hpp \
libmaus2/aio/CharArrayOutputStream.hpp
libmaus2parallel_includedir=$(includedir)/libmaus2/parallel
libmaus2parallel_include_HEADERS=\
libmaus2/parallel/StdThread.hpp \
......
......@@ -3692,7 +3692,8 @@ libmaus2util_include_HEADERS = \
libmaus2/util/Base64.hpp \
libmaus2/util/AutoArrayUInt8TBaseAllocator.hpp \
libmaus2/util/AutoArrayUInt8TBaseTypeInfo.hpp \
libmaus2/util/DirectoryStructure.hpp
libmaus2/util/DirectoryStructure.hpp \
libmaus2/util/StreamGetObject.hpp
 
libmaus2uint_includedir = $(includedir)/libmaus2/uint
libmaus2uint_include_HEADERS = \
......@@ -3811,7 +3812,13 @@ libmaus2aio_include_HEADERS = \
libmaus2/aio/MemoryBackedOutputStreamBuffer.hpp \
libmaus2/aio/MemoryBackedOutputStream.hpp \
libmaus2/aio/SkipConcatInputStream.hpp \
libmaus2/aio/SkipConcatInputStreamBuffer.hpp
libmaus2/aio/SkipConcatInputStreamBuffer.hpp \
libmaus2/aio/CountOutputStreamBuffer.hpp \
libmaus2/aio/CountOutputStream.hpp \
libmaus2/aio/CharArrayInputStreamBuffer.hpp \
libmaus2/aio/CharArrayInputStream.hpp \
libmaus2/aio/CharArrayOutputStreamBuffer.hpp \
libmaus2/aio/CharArrayOutputStream.hpp
 
libmaus2parallel_includedir = $(includedir)/libmaus2/parallel
libmaus2parallel_include_HEADERS = \
......@@ -22,6 +22,14 @@
#include <libmaus2/autoarray/AutoArray.hpp>
#include <libmaus2/sorting/InPlaceParallelSort.hpp>
#include <libmaus2/util/PutObject.hpp>
#include <libmaus2/util/CountPutObject.hpp>
#include <libmaus2/util/GetObject.hpp>
#include <libmaus2/util/StreamGetObject.hpp>
#include <libmaus2/aio/CountOutputStream.hpp>
#include <libmaus2/aio/CharArrayInputStream.hpp>
#include <libmaus2/aio/CharArrayOutputStream.hpp>
#include <libmaus2/util/utf8.hpp>
namespace libmaus2
{
......@@ -388,11 +396,219 @@ namespace libmaus2
}
};
template<typename _data_type, typename _order_type = std::less<_data_type> >
struct SerialisingBuffer
{
//! data type
typedef _data_type data_type;
//! order type
typedef _order_type order_type;
//!
typedef SerialisingBuffer<data_type,order_type> this_type;
std::ostream & out;
libmaus2::autoarray::AutoArray<char *> B;
order_type & order;
char ** pe;
char ** pc;
char * ca;
char * cc;
uint64_t w;
uint64_t threads;
/**
* comparator class
**/
struct Comparator
{
order_type * order;
Comparator(order_type & rorder)
: order(&rorder)
{
}
bool operator()(char * a, char * b) const
{
libmaus2::util::StreamGetObject<char const *> LA(a);
libmaus2::util::StreamGetObject<char const *> LB(b);
uint64_t const utfa = libmaus2::util::UTF8::decodeUTF8Unchecked(LA);
uint64_t const utfb = libmaus2::util::UTF8::decodeUTF8Unchecked(LB);
uint64_t const lutfa = libmaus2::util::UTF8::lengthUTF8(utfa);
uint64_t const lutfb = libmaus2::util::UTF8::lengthUTF8(utfb);
data_type A;
data_type B;
libmaus2::aio::CharArrayInputStream GA(a+lutfa,a+lutfa+utfa);
libmaus2::aio::CharArrayInputStream GB(b+lutfb,b+lutfb+utfb);
A.deserialise(GA);
B.deserialise(GB);
return (*order)(A,B);
}
};
Comparator comp;
/**
* set up buffer for size
**/
void setupBuffer(uint64_t const nbufsize)
{
uint64_t const abufsize = (nbufsize + sizeof(char *) - 1) / sizeof(char *);
B = libmaus2::autoarray::AutoArray<char *>();
B = libmaus2::autoarray::AutoArray<char *>(abufsize,false);
pe = B.end(),
pc = pe;
ca = reinterpret_cast<char *>(B.begin());
cc = ca;
}
/**
* increase buffer size
**/
void bumpBuffer()
{
uint64_t obufsize = B.size() * sizeof(char *);
setupBuffer(obufsize ? (2*obufsize) : 1);
}
SerialisingBuffer(
std::ostream & rout,
uint64_t const rbufsize,
order_type & rorder,
uint64_t const rthreads
) : out(rout), order(rorder), w(0), threads(rthreads), comp(order)
{
setupBuffer(rbufsize);
}
/**
* flush buffer, return number of elements flushed and position of flushed block in output stream
**/
std::pair<uint64_t,uint64_t> flush()
{
// number of bytes written before
uint64_t const pre_w = w;
// number of elements in buffer
uint64_t const n = pe-pc;
if ( threads <= 1 )
std::sort(pc,pc+n,comp);
else
libmaus2::sorting::InPlaceParallelSort::inplacesort2<
char **,Comparator
>(
pc,pc+n,
threads,
comp
);
// write sorted elements
data_type D;
for ( uint64_t i = 0; i < n; ++i )
{
// decode length of entry
libmaus2::util::StreamGetObject<char const *> LA(pc[i]);
uint64_t const utf = libmaus2::util::UTF8::decodeUTF8Unchecked(LA);
// get length of utf-8 code
uint64_t const lutf = libmaus2::util::UTF8::lengthUTF8(utf);
// set up stream for decoding object
libmaus2::aio::CharArrayInputStream GA(pc[i]+lutf,pc[i]+lutf+utf);
// decode object
D.deserialise(GA);
assert ( GA );
// encode object
D.serialise(out);
// add size of object
w += utf;
}
// reset buffer pointers
pc = pe;
cc = ca;
return std::pair<uint64_t,uint64_t>(n,pre_w);
}
/**
* put one object, return number of flushed elements and file position of flush block
**/
std::pair<uint64_t,uint64_t> put(data_type const & D)
{
// check size of object
libmaus2::aio::CountOutputStream CPO;
D.serialise(CPO);
CPO.flush();
// get length of object size in utf8
uint64_t const utfsize = libmaus2::util::UTF8::lengthUTF8(CPO.c);
// available space
uint64_t spaceav = reinterpret_cast<char const *>(pc) - cc;
// required space
uint64_t const spacereq = CPO.c + utfsize + sizeof(char *);
// empty flush info
std::pair<uint64_t,uint64_t> flushInfo(0,w);
// if space is insufficient
if ( spacereq > spaceav )
{
// flush buffer
flushInfo = flush();
// recompute free space
spaceav = reinterpret_cast<char const *>(pc) - cc;
// while buffer is too small to hold element
while ( spacereq > spaceav )
{
assert ( pc == pe );
assert ( cc == ca );
bumpBuffer();
spaceav = reinterpret_cast<char const *>(pc) - cc;
}
}
// output stream
libmaus2::aio::CharArrayOutputStream PO(cc,cc+utfsize+CPO.c);
// encode length as UTF-8
libmaus2::util::UTF8::encodeUTF8(CPO.c,PO);
// encode object
D.serialise(PO);
assert ( PO );
// store pointer
*--pc = cc;
// move data pointer
cc += CPO.c + utfsize;
return flushInfo;
}
};
/**
* class for sorting buffer file output
**/
template<typename _data_type, typename _order_type = std::less<_data_type> >
struct SerialisingSortingBufferedOutput : public BufferedOutputBase<_data_type>
struct SerialisingSortingBufferedOutput
{
//! data type
typedef _data_type data_type;
......@@ -422,6 +638,7 @@ namespace libmaus2
order_type & order;
std::vector<BlockDescriptor> blocksizes;
uint64_t const numthreads;
SerialisingBuffer<data_type,order_type> B;
public:
/**
......@@ -431,7 +648,7 @@ namespace libmaus2
* @param bufsize size of buffer in elements
**/
SerialisingSortingBufferedOutput(std::ostream & rout, uint64_t const bufsize, uint64_t const rnumthreads = 1)
: BufferedOutputBase<_data_type>(bufsize), out(rout), Porder(new order_type), order(*Porder), blocksizes(), numthreads(rnumthreads)
: out(rout), Porder(new order_type), order(*Porder), blocksizes(), numthreads(rnumthreads), B(out,bufsize,order,numthreads)
{
}
......@@ -444,7 +661,7 @@ namespace libmaus2
* @param rorder sort order
**/
SerialisingSortingBufferedOutput(std::ostream & rout, uint64_t const bufsize, order_type & rorder, uint64_t const rnumthreads = 1)
: BufferedOutputBase<_data_type>(bufsize), out(rout), Porder(), order(rorder), blocksizes(), numthreads(rnumthreads)
: out(rout), Porder(), order(rorder), blocksizes(), numthreads(rnumthreads), B(out,bufsize,order,numthreads)
{
}
......@@ -462,47 +679,18 @@ namespace libmaus2
**/
void flush()
{
base_type::flush();
out.flush();
std::pair<uint64_t,uint64_t> const flushInfo = B.flush();
if ( flushInfo.first )
blocksizes.push_back(BlockDescriptor(flushInfo.first,flushInfo.second));
}
/**
* write buffer to output stream
**/
virtual void writeBuffer()
void put(data_type const & D)
{
if ( base_type::fill() )
{
if ( numthreads <= 1 )
std::sort(base_type::pa,base_type::pc,order);
else
{
libmaus2::sorting::InPlaceParallelSort::inplacesort2<data_type *,order_type>(
base_type::pa,base_type::pc,
numthreads,
order
);
}
uint64_t const fileptr = out.tellp();
std::pair<uint64_t,uint64_t> const flushInfo = B.put(D);
for ( data_type const * pi = base_type::pa; pi != base_type::pc; ++pi )
{
pi->serialise(out);
if ( ! out )
{
::libmaus2::exception::LibMausException se;
se.getStream() << "SerialisingSortingBufferedOutput: Failed to write" << std::endl;
se.finish();
throw se;
}
}
blocksizes.push_back(BlockDescriptor(base_type::fill(),fileptr));
base_type::reset();
}
if ( flushInfo.first )
blocksizes.push_back(BlockDescriptor(flushInfo.first,flushInfo.second));
}
/**
......
/*
libmaus2
Copyright (C) 2009-2014 German Tischler
Copyright (C) 2011-2014 Genome Research Limited
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#if ! defined(LIBMAUS2_AIO_CHARARRAYINPUTSTREAM_HPP)
#define LIBMAUS2_AIO_CHARARRAYINPUTSTREAM_HPP
#include <libmaus2/aio/CharArrayInputStreamBuffer.hpp>
namespace libmaus2
{
namespace aio
{
struct CharArrayInputStream : public CharArrayInputStreamBuffer, public std::istream
{
typedef CharArrayInputStream this_type;
typedef libmaus2::util::unique_ptr<this_type>::type unique_ptr_type;
typedef libmaus2::util::shared_ptr<this_type>::type shared_ptr_type;
CharArrayInputStream(char * ca, char * ce)
: CharArrayInputStreamBuffer(ca,ce), std::istream(this)
{}
};
}
}
#endif
/*
libmaus2
Copyright (C) 2009-2014 German Tischler
Copyright (C) 2011-2014 Genome Research Limited
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#if !defined(LIBMAUS2_AIO_CHARARRAYINPUTSTREAMBUFFER_HPP)
#define LIBMAUS2_AIO_CHARARRAYINPUTSTREAMBUFFER_HPP
#include <streambuf>
#include <istream>
#include <libmaus2/autoarray/AutoArray.hpp>
namespace libmaus2
{
namespace aio
{
struct CharArrayInputStreamBuffer : public ::std::streambuf
{
public:
typedef CharArrayInputStreamBuffer this_type;
typedef libmaus2::util::unique_ptr<this_type>::type unique_ptr_type;
typedef libmaus2::util::shared_ptr<this_type>::type shared_ptr_type;
private:
CharArrayInputStreamBuffer(CharArrayInputStreamBuffer const &);
CharArrayInputStreamBuffer & operator=(CharArrayInputStreamBuffer &);
public:
CharArrayInputStreamBuffer(
char * a,
char * e
)
{
setg(a,a,e);
}
private:
// gptr as unsigned pointer
uint8_t const * uptr() const
{
return reinterpret_cast<uint8_t const *>(gptr());
}
int_type underflow()
{
// if there is still data, then return it
if ( gptr() < egptr() )
return static_cast<int_type>(*uptr());
assert ( gptr() == egptr() );
return traits_type::eof();
}
};
}
}
#endif
/*
libmaus2
Copyright (C) 2009-2014 German Tischler
Copyright (C) 2011-2014 Genome Research Limited
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#if ! defined(LIBMAUS2_AIO_CHARARRAYOUTPUTSTREAM_HPP)
#define LIBMAUS2_AIO_CHARARRAYOUTPUTSTREAM_HPP
#include <libmaus2/aio/CharArrayOutputStreamBuffer.hpp>
namespace libmaus2
{
namespace aio
{
struct CharArrayOutputStream : public CharArrayOutputStreamBuffer, public std::ostream
{
typedef CharArrayOutputStream this_type;
typedef libmaus2::util::unique_ptr<this_type>::type unique_ptr_type;
typedef libmaus2::util::shared_ptr<this_type>::type shared_ptr_type;
CharArrayOutputStream(char * ca, char * ce)
: CharArrayOutputStreamBuffer(ca,ce), std::ostream(this)
{}
};
}
}
#endif
/*
libmaus2
Copyright (C) 2009-2013 German Tischler
Copyright (C) 2011-2013 Genome Research Limited
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#if ! defined(LIBMAUS2_AIO_CHARARRAYOUTPUTSTREAMBUFFER_HPP)
#define LIBMAUS2_AIO_CHARARRAYOUTPUTSTREAMBUFFER_HPP
#include <ostream>
#include <cmath>
#include <libmaus2/LibMausConfig.hpp>
namespace libmaus2
{
namespace aio
{
struct CharArrayOutputStreamBuffer : public ::std::streambuf
{
char * a;
char * e;
public:
CharArrayOutputStreamBuffer(char * ra, char * re)
: a(ra), e(re)
{
setp(a,e);
}
int_type overflow(int_type /*c*/ = traits_type::eof())
{
return traits_type::eof();
}
int sync()
{
return 0; // no error, -1 for error
}
};
}
}
#endif
/*
libmaus2
Copyright (C) 2009-2013 German Tischler
Copyright (C) 2011-2013 Genome Research Limited
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#if ! defined(LIBMAUS2_AIO_COUNTOUTPUTSTREAM_HPP)
#define LIBMAUS2_AIO_COUNTOUTPUTSTREAM_HPP
#include <libmaus2/aio/CountOutputStreamBuffer.hpp>
namespace libmaus2
{
namespace aio
{
struct CountOutputStream : public CountOutputStreamBuffer, public std::ostream
{
typedef CountOutputStream this_type;
typedef libmaus2::util::unique_ptr<this_type>::type unique_ptr_type;
typedef libmaus2::util::shared_ptr<this_type>::type shared_ptr_type;
CountOutputStream()
: CountOutputStreamBuffer(), std::ostream(this)
{
exceptions(std::ios::badbit);
}
~CountOutputStream()
{
flush();
}
};
}
}
#endif
/*
libmaus2
Copyright (C) 2009-2013 German Tischler
Copyright (C) 2011-2013 Genome Research Limited
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#if ! defined(LIBMAUS2_AIO_COUNTOUTPUTSTREAMBUFFER_HPP)
#define LIBMAUS2_AIO_COUNTOUTPUTSTREAMBUFFER_HPP
#include <ostream>
#include <cmath>
#include <libmaus2/LibMausConfig.hpp>
namespace libmaus2
{
namespace aio
{
struct CountOutputStreamBuffer : public ::std::streambuf
{
char B[16];
uint64_t c;
void doSync()
{
int64_t const n = pptr()-pbase();
pbump(-n);
c += n;
}
public:
CountOutputStreamBuffer()
: c(0)
{
setp(&B[0],&B[sizeof(B)]-1);
}
int_type overflow(int_type c = traits_type::eof())
{
if ( c != traits_type::eof() )
{
*pptr() = c;
pbump(1);
doSync();
}
return c;
}
int sync()
{
doSync();
return 0; // no error, -1 for error
}
};
}
}
#endif
......@@ -73,10 +73,10 @@ namespace libmaus2
template<typename element_type>
void sortSingle(
uint64_t const blocksize = 1024ull,
uint64_t const backblocksize = 1024ull,
uint64_t const maxfan = 16ull,
uint64_t const sortthreads = 1ull
uint64_t const blocksize = libmaus2::sorting::SerialisingSortingBufferedOutputFile<element_type>::getDefaultSortBlockSize(),
uint64_t const backblocksize = libmaus2::sorting::SerialisingSortingBufferedOutputFile<element_type>::getDefaultBackBlockSize(),
uint64_t const maxfan = libmaus2::sorting::SerialisingSortingBufferedOutputFile<element_type>::getDefaultMaxFan(),
uint64_t const sortthreads = libmaus2::sorting::SerialisingSortingBufferedOutputFile<element_type>::getDefaultSortThreads()
)
{
flush();
......@@ -89,10 +89,10 @@ namespace libmaus2
template<typename element_type>
void reduce(
std::string const & out,
uint64_t const blocksize = 1024ull,
uint64_t const backblocksize = 1024ull,
uint64_t const maxfan = 16ull,
uint64_t const sortthreads = 1ull
uint64_t const blocksize = libmaus2::sorting::SerialisingSortingBufferedOutputFile<element_type>::getDefaultSortBlockSize(),
uint64_t const backblocksize = libmaus2::sorting::SerialisingSortingBufferedOutputFile<element_type>::getDefaultBackBlockSize(),
uint64_t const maxfan = libmaus2::sorting::SerialisingSortingBufferedOutputFile<element_type>::getDefaultMaxFan(),
uint64_t const sortthreads = libmaus2::sorting::SerialisingSortingBufferedOutputFile<element_type>::getDefaultSortThreads()
)
{
flush();
......