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
13 changes: 4 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#CC = gcc
EXTRA_FLAGS = -Wno-unused-function -Wno-misleading-indentation
CFLAGS += -Wall -O3 $(EXTRA_FLAGS)
CFLAGS = -Wall -O3 $(EXTRA_FLAGS)

# for debug
ifneq ($(debug),)
DFLAGS = -D __DEBUG__
endif
# for gdb
ifneq ($(gdb),)
CFLAGS += -Wall -g ${DFLAGS} $(EXTRA_FLAGS)
CFLAGS = -Wall -g ${DFLAGS} $(EXTRA_FLAGS)
else
CFLAGS += -Wall -O3 ${DFLAGS} $(EXTRA_FLAGS)
CFLAGS = -Wall -O3 ${DFLAGS} $(EXTRA_FLAGS)
endif

# for gprof
Expand Down Expand Up @@ -62,11 +62,6 @@ else ifneq ($(avx512bw),)
py_SIMD_FLAG = AVX512BW=1
endif

# Let CACTUS_ARCH override this (it'll add -march to CFLAGS) in order to avoid -march native for more portable binaries
ifneq ($(CACTUS_ARCH),)
SIMD_FLAG =
endif

.c.o:
$(CC) -c $(CFLAGS) $< -o $@

Expand Down Expand Up @@ -107,7 +102,7 @@ $(SRC_DIR)/simd_abpoa_align.o:$(SRC_DIR)/simd_abpoa_align.c $(SRC_DIR)/abpoa_gra

install_py: python/cabpoa.pxd python/pyabpoa.pyx python/README.md
${py_SIMD_FLAG} python setup.py install

sdist: install_py
${py_SIMD_FLAG} python setup.py sdist #bdist_wheel

Expand Down
2 changes: 1 addition & 1 deletion include/simd_instruction.h
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ extern "C" {

int simd_check(void);

static inline void *SIMDMalloc(size_t size, size_t align) {
static void *SIMDMalloc(size_t size, size_t align) {
void *ret = (void*)_mm_malloc(size, align);
if (ret == NULL) {
fprintf(stderr, "[%s] mm_Malloc fail!\nSize: %ld\n", __func__, size);
Expand Down
2 changes: 1 addition & 1 deletion src/simd_instruction.h
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ extern "C" {

int simd_check(void);

static inline void *SIMDMalloc(size_t size, size_t align) {
static void *SIMDMalloc(size_t size, size_t align) {
void *ret = (void*)_mm_malloc(size, align);
if (ret == NULL) {
fprintf(stderr, "[%s] mm_Malloc fail!\nSize: %ld\n", __func__, size);
Expand Down
10 changes: 3 additions & 7 deletions src/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,9 @@ double cputime()
double realtime()
{
struct timeval tp;
//struct timezone tzp;
gettimeofday(&tp, NULL);
return tp.tv_sec*1e6 + tp.tv_usec * 1e-6;
struct timezone tzp;
gettimeofday(&tp, &tzp);
return tp.tv_sec + tp.tv_usec * 1e-6;
}

long peakrss(void)
Expand Down Expand Up @@ -393,7 +393,6 @@ void print_format_time(FILE *out)

int err_func_format_printf(const char *func, const char *format, ...)
{
#ifdef ENABLE_ABPOA_LOG
print_format_time(stderr);
fprintf(stderr, "[%s] ", func);
va_list arg;
Expand All @@ -405,7 +404,4 @@ int err_func_format_printf(const char *func, const char *format, ...)
va_end(arg);
if (done < 0) _err_fatal_simple("vfprintf(stderr)", strerror(saveErrno));
return done;
#else
return 0;
#endif
}