Skip to content

Commit

Permalink
fixed gcc4.6 errors, added --no-auto-append
Browse files Browse the repository at this point in the history
  • Loading branch information
bbuchfink committed May 16, 2016
1 parent 8246576 commit bd52eee
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 162 deletions.
4 changes: 4 additions & 0 deletions src/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[0.8.1]
- added option to disable auto appending of DAA and DMND file extensions (--no-auto-append)
- fixed some compiler errors for GCC 4.6

[0.8.0]
- fixed a bug that would sometimes cause alignments to be missed
- fixed a bug that would cause alignments on the reverse strand to be missed in blastx mode
Expand Down
2 changes: 1 addition & 1 deletion src/align/align_read.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void align_read(Output_buffer &buffer,
const size_t db_letters = ref_header.letters;
unsigned padding[6];

typedef Map<typename vector<hit>::iterator,typename hit::template Query_id<1> > Map_t;
typedef Map<typename vector<hit>::iterator,typename hit::Query_id<1> > Map_t;
Map_t hits (begin, end);
typename Map_t::Iterator i = hits.begin();
while(i.valid()) {
Expand Down
2 changes: 1 addition & 1 deletion src/basic/basic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "translate.h"
#include "statistics.h"

const char* Const::version_string = "0.8.0";
const char* Const::version_string = "0.8.1";
const char* Const::program_name = "diamond";
const char* Const::id_delimiters = " \a\b\f\n\r\t\v";

Expand Down
9 changes: 6 additions & 3 deletions src/basic/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ Config::Config(int argc, const char **argv)
("index-mode", 0, "index mode (0=4x12, 1=16x9)", index_mode)
("fetch-size", 0, "trace point fetch size", fetch_size, 4096u)
("single-domain", 0, "Discard secondary domains within one target sequence", single_domain)
("dbsize", 0, "effective database size (in letters)", db_size);
("dbsize", 0, "effective database size (in letters)", db_size)
("no-auto-append", 0, "disable auto appending of DAA and DMND file extensions", no_auto_append);

Options_group view_options("View options");
view_options.add()
Expand Down Expand Up @@ -154,8 +155,10 @@ Config::Config(int argc, const char **argv)
set_option(index_mode, 0u);
}

auto_append_extension(database, ".dmnd");
auto_append_extension(daa_file, ".daa");
if (!no_auto_append) {
auto_append_extension(database, ".dmnd");
auto_append_extension(daa_file, ".daa");
}

message_stream << Const::program_name << " v" << Const::version_string << "." << Const::build_version << " | by Benjamin Buchfink <[email protected]>" << endl;
message_stream << "Check http://github.com/bbuchfink/diamond/releases for updates." << endl << endl;
Expand Down
1 change: 1 addition & 0 deletions src/basic/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ struct Config

bool mode_sensitive;
unsigned verbosity;
bool no_auto_append;

typedef enum { makedb = 0, blastp = 1, blastx = 2, view = 3, help = 4, version = 5 } Command;
unsigned command;
Expand Down
2 changes: 1 addition & 1 deletion src/basic/const.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ struct Const
{

enum {
build_version = 62,
build_version = 63,
build_compatibility = 52,
db_version = 0,
daa_version = 0,
Expand Down
68 changes: 0 additions & 68 deletions src/basic/score_traits.h

This file was deleted.

74 changes: 0 additions & 74 deletions src/basic/value_type.h

This file was deleted.

2 changes: 1 addition & 1 deletion src/dp/score_vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ struct score_vector<uint8_t>
data_ = _mm_set1_epi8(score_traits<uint8_t>::zero);
}

explicit score_vector(int x):
explicit score_vector(char x):
data_ (_mm_set(x))
{ }

Expand Down
2 changes: 1 addition & 1 deletion src/util/strict_fstream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ struct static_method_holder
"binary"
};
std::string res;
for (size_t i = 0; i < n_modes; ++i)
for (size_t i = 0; i < (size_t)n_modes; ++i)
{
if (mode & mode_val_v[i])
{
Expand Down
15 changes: 3 additions & 12 deletions src/util/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,19 +254,10 @@ inline string* get_str(const char *s, const char *delimiters)
return new string (s, find_first_of(s, delimiters));
}

inline __m128i _mm_set(int a)
inline __m128i _mm_set(char a)
{
int y = a << 8 | a;
__m128i z = __m128i();
z = _mm_insert_epi16 (z, y, 0);
z = _mm_insert_epi16 (z, y, 1);
z = _mm_insert_epi16 (z, y, 2);
z = _mm_insert_epi16 (z, y, 3);
z = _mm_insert_epi16 (z, y, 4);
z = _mm_insert_epi16 (z, y, 5);
z = _mm_insert_epi16 (z, y, 6);
z = _mm_insert_epi16 (z, y, 7);
return z;
const int x = (int)a;
return _mm_set1_epi32(x << 24 | x << 16 | x << 8 | x);
}

template<typename _t, unsigned d1, unsigned d2>
Expand Down

0 comments on commit bd52eee

Please sign in to comment.