Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "simde"]
path = simde
url = https://github.com/nemequ/simde-no-tests
20 changes: 11 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ ifneq (,$(findstring Darwin,$(shell uname)))
MACOS = 1
endif

EXTRA_FLAGS += -DPOPCNT_CAPABILITY -std=c++11
EXTRA_FLAGS += -std=c++11
INC += -I. -I third_party

MM_DEF =
Expand Down Expand Up @@ -152,9 +152,10 @@ HISAT2_REPEAT_CPPS_MAIN = $(REPEAT_CPPS) $(BUILD_CPPS) hisat2_repeat_main.cpp
SEARCH_FRAGMENTS = $(wildcard search_*_phase*.c)
VERSION = $(shell cat VERSION)

ARCH=$(shell uname -m)
# Convert BITS=?? to a -m flag
BITS=32
ifeq (x86_64,$(shell uname -m))
ifeq (x86_64,$(ARCH))
BITS=64
endif
# msys will always be 32 bit so look at the cpu arch instead.
Expand All @@ -165,14 +166,15 @@ ifneq (,$(findstring AMD64,$(PROCESSOR_ARCHITEW6432)))
endif
BITS_FLAG =

ifeq (32,$(BITS))
BITS_FLAG = -m32
endif

ifeq (64,$(BITS))
BITS_FLAG = -m64
ifeq (x86_64,$(ARCH))
ifeq (32,$(BITS))
BITS_FLAG = -m32
endif
ifeq (64,$(BITS))
BITS_FLAG = -m64
endif
SSE_FLAG=-msse2
endif
SSE_FLAG=-msse2

DEBUG_FLAGS = -O0 -g3 $(BITS_FLAG) $(SSE_FLAG)
DEBUG_DEFS = -DCOMPILER_OPTIONS="\"$(DEBUG_FLAGS) $(EXTRA_FLAGS)\""
Expand Down
3 changes: 2 additions & 1 deletion aligner_sw.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,12 @@

#define INLINE_CUPS

#define SIMDE_ENABLE_NATIVE_ALIASES
#include <simde/x86/sse2.h>
#include <stdint.h>
#include <iostream>
#include <limits>
#include "threading.h"
#include <emmintrin.h>
#include "aligner_sw_common.h"
#include "aligner_sw_nuc.h"
#include "ds.h"
Expand Down
2 changes: 1 addition & 1 deletion alphabet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ int dnacomp[5] = {

const char *iupacs = "!ACMGRSVTWYHKDBN!acmgrsvtwyhkdbn";

char mask2iupac[16] = {
int mask2iupac[16] = {
-1,
'A', // 0001
'C', // 0010
Expand Down
2 changes: 1 addition & 1 deletion alphabet.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ extern uint8_t dinuc2color[5][5];
/// corresponding 2-bit nucleotide
extern uint8_t nuccol2nuc[5][5];
/// Convert a 4-bit mask into an IUPAC code
extern char mask2iupac[16];
extern int mask2iupac[16];

/// Convert an ascii color to an ascii dna char
extern char col2dna[];
Expand Down
5 changes: 2 additions & 3 deletions processor_support.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#if defined(__INTEL_COMPILER)
# define USING_INTEL_COMPILER
#elif defined(__GNUC__)
#elif defined(__GNUC__) && defined(__x86_64__) || defined(__i386__)
# define USING_GCC_COMPILER
# include <cpuid.h>
#elif defined(_MSC_VER)
Expand Down Expand Up @@ -52,8 +52,7 @@ class ProcessorSupport {
#elif defined(USING_GCC_COMPILER)
__get_cpuid(0x1, &regs.EAX, &regs.EBX, &regs.ECX, &regs.EDX);
#else
std::cerr << "ERROR: please define __cpuid() for this build.\n";
assert(0);
return false;
#endif
if( !( (regs.ECX & BIT(20)) && (regs.ECX & BIT(23)) ) ) return false;
}
Expand Down
1 change: 1 addition & 0 deletions simde
Submodule simde added at 3698ce
4 changes: 3 additions & 1 deletion sse_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@
#ifndef SSE_UTIL_H_
#define SSE_UTIL_H_

#define SIMDE_ENABLE_NATIVE_ALIASES
#include <simde/x86/sse2.h>

#include "assert_helpers.h"
#include "ds.h"
#include "limit.h"
#include <iostream>
#include <emmintrin.h>

class EList_m128i {
public:
Expand Down
2 changes: 1 addition & 1 deletion sstring.h
Original file line number Diff line number Diff line change
Expand Up @@ -3326,7 +3326,7 @@ class SDnaMaskString : public SStringExpandable<char, S, M> {
*/
char toChar(size_t idx) const {
assert_range((int)this->cs_[idx], 0, 15);
return mask2iupac[(int)this->cs_[idx]];
return (char)mask2iupac[(int)this->cs_[idx]];
}

/**
Expand Down