diff --git a/kmer_counter/kmc.h b/kmer_counter/kmc.h index 8c239c8..a5a6f87 100644 --- a/kmer_counter/kmc.h +++ b/kmer_counter/kmc.h @@ -1016,37 +1016,17 @@ template bool CKMCGetMapSize(), Queues.s_mapper->GetMap()); #endif - SortFunction sort_func; + SortFunction sort_func; +#ifdef __APPLE__ + sort_func = RadixSort::RadixSortMSD; + CSmallSort::Adjust(384); +#else int iset = instrset_detect(); auto proc_name = CCpuInfo::GetBrand(); bool is_intel = CCpuInfo::GetVendor() == "GenuineIntel"; bool at_least_avx = iset >= 7; std::transform(proc_name.begin(), proc_name.end(), proc_name.begin(), ::tolower); bool is_xeon = proc_name.find("xeon") != string::npos; -//#define PRINT_PROC_INFO -#ifdef PRINT_PROC_INFO - if (is_xeon || (is_intel && at_least_avx)) - { - if (is_xeon) - cout << "Xeon detected\n"; - else - cout << "Some intel with at least avx\n"; - - if (iset >= 8) - sort_func = RadulsSort::RadixSortMSD_AVX2, cout << "using avx2 version of RADULS\n"; - else if (iset >= 7) - sort_func = RadulsSort::RadixSortMSD_AVX, cout << "using avx version of RADULS\n"; - else if (iset >= 5) - sort_func = RadulsSort::RadixSortMSD_SSE41, cout << "using sse4.1 version of RADULS\n"; - else if (iset >= 2) - sort_func = RadulsSort::RadixSortMSD_SSE2, cout << "using sse2 version of RADULS\n"; - } - else - { - sort_func = RadixSort::RadixSortMSD, cout << "using KMC3 radix instead of RADULS\n"; - CSmallSort::Adjust(384); - } -#else if (is_xeon || (is_intel && at_least_avx)) { if (iset >= 8) diff --git a/makefile_mac b/makefile_mac index 227de80..0d1ea9b 100644 --- a/makefile_mac +++ b/makefile_mac @@ -30,11 +30,7 @@ $(KMC_MAIN_DIR)/kb_storer.o \ $(KMC_MAIN_DIR)/kmer.o \ $(KMC_MAIN_DIR)/prob_qual.o -RADULS_OBJS = \ -$(KMC_MAIN_DIR)/raduls_sse2.o \ -$(KMC_MAIN_DIR)/raduls_sse41.o \ -$(KMC_MAIN_DIR)/raduls_avx2.o \ -$(KMC_MAIN_DIR)/raduls_avx.o + KMC_LIBS = \ $(KMC_MAIN_DIR)/libs/libz.1.2.5.dylib \ $(KMC_MAIN_DIR)/libs/libbz2.1.0.5.dylib @@ -81,18 +77,8 @@ $(KMC_OBJS) $(KMC_DUMP_OBJS) $(KMC_API_OBJS): %.o: %.cpp $(KMC_TOOLS_OBJS): %.o: %.cpp $(CC) $(KMC_TOOLS_CFLAGS) -c $< -o $@ -$(KMC_MAIN_DIR)/raduls_sse2.o: $(KMC_MAIN_DIR)/raduls_sse2.cpp - $(CC) $(CFLAGS) -msse2 -c $< -o $@ -$(KMC_MAIN_DIR)/raduls_sse41.o: $(KMC_MAIN_DIR)/raduls_sse41.cpp - $(CC) $(CFLAGS) -msse4.1 -c $< -o $@ -$(KMC_MAIN_DIR)/raduls_avx.o: $(KMC_MAIN_DIR)/raduls_avx.cpp - $(CC) $(CFLAGS) -mavx -fabi-version=0 -c $< -o $@ -$(KMC_MAIN_DIR)/raduls_avx2.o: $(KMC_MAIN_DIR)/raduls_avx2.cpp - $(CC) $(CFLAGS) -mavx2 -mfma -fabi-version=0 -c $< -o $@ -$(KMC_MAIN_DIR)/instrset_detect.o: $(KMC_MAIN_DIR)/libs/vectorclass/instrset_detect.cpp - $(CC) $(CFLAGS) -c $< -o $@ - -kmc: $(KMC_OBJS) $(RADULS_OBJS) $(KMC_MAIN_DIR)/instrset_detect.o + +kmc: $(KMC_OBJS) -mkdir -p $(KMC_BIN_DIR) $(CC) $(CLINK) -o $(KMC_BIN_DIR)/$@ $^ $(KMC_LIBS) kmc_dump: $(KMC_DUMP_OBJS) $(KMC_API_OBJS) @@ -109,4 +95,4 @@ clean: -rm $(KMC_TOOLS_DIR)/*.o -rm -rf bin -all: kmc kmc_dump kmc_tools \ No newline at end of file +all: kmc kmc_dump kmc_tools