Skip to content
Merged
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
7 changes: 0 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)

if("${CMAKE_C_COMPILER_FRONTEND_VARIANT}" STREQUAL "MSVC")
get_filename_component(_cl_bin_dir ${CMAKE_C_COMPILER} DIRECTORY)
file(TO_CMAKE_PATH "${_cl_bin_dir}/../lib/libomp.lib" OpenMP_libomp_LIBRARY)
file(TO_CMAKE_PATH "${_cl_bin_dir}/libomp.dll" OpenMP_libomp_DLL)
endif()

find_package(StandardMathLibrary REQUIRED)
find_package(OpenMP)

set(TARGET_ARCHITECTURE "skylake" CACHE STRING "CPU architecture")
OptimizeForArchitecture()
Expand Down
26 changes: 0 additions & 26 deletions base64/lib/lib.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#include <stdint.h>
#include <stddef.h>
#ifdef _OPENMP
#include <omp.h>
#endif

#include "../include/libbase64.h"
#include "tables/tables.h"
Expand Down Expand Up @@ -89,16 +86,6 @@ base64_stream_decode
return codec.dec(state, src, srclen, out, outlen);
}

#ifdef _OPENMP

// Due to the overhead of initializing OpenMP and creating a team of
// threads, we require the data length to be larger than a threshold:
#define OMP_THRESHOLD 20000

// Conditionally include OpenMP-accelerated codec implementations:
#include "lib_openmp.c"
#endif

void
base64_encode
( const char *src
Expand All @@ -112,13 +99,6 @@ base64_encode
size_t t;
struct base64_state state;

#ifdef _OPENMP
if (srclen >= OMP_THRESHOLD) {
base64_encode_openmp(src, srclen, out, outlen, flags);
return;
}
#endif

// Init the stream reader:
base64_stream_encode_init(&state, flags);

Expand All @@ -144,12 +124,6 @@ base64_decode
int ret;
struct base64_state state;

#ifdef _OPENMP
if (srclen >= OMP_THRESHOLD) {
return base64_decode_openmp(src, srclen, out, outlen, flags);
}
#endif

// Init the stream reader:
base64_stream_decode_init(&state, flags);

Expand Down
149 changes: 0 additions & 149 deletions base64/lib/lib_openmp.c

This file was deleted.

Loading