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
3 changes: 1 addition & 2 deletions components/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,6 @@ set(SOURCE_FILES_reducer_unitTest
)

set(SOURCE_FILES_unitTest
src/clp/Array.hpp
src/clp/aws/AwsAuthenticationSigner.cpp
src/clp/aws/AwsAuthenticationSigner.hpp
src/clp/aws/constants.hpp
Expand Down Expand Up @@ -598,7 +597,6 @@ set(SOURCE_FILES_unitTest
submodules/sqlite3/sqlite3ext.h
tests/LogSuppressor.hpp
tests/TestOutputCleaner.hpp
tests/test-Array.cpp
tests/test-BoundedReader.cpp
tests/test-BufferedFileReader.cpp
tests/test-clp_s-end_to_end.cpp
Expand Down Expand Up @@ -663,6 +661,7 @@ target_link_libraries(unitTest
clp::regex_utils
clp::string_utils
yaml-cpp::yaml-cpp
ystdlib::containers
ystdlib::error_handling
${LIBLZMA_LIBRARIES}
ZStd::ZStd
Expand Down
111 changes: 0 additions & 111 deletions components/core/src/clp/Array.hpp

This file was deleted.

4 changes: 2 additions & 2 deletions components/core/src/clp/NetworkReader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
#include <vector>

#include <curl/curl.h>
#include <ystdlib/containers/Array.hpp>

#include "Array.hpp"
#include "CurlDownloadHandler.hpp"
#include "CurlGlobalInstance.hpp"
#include "ErrorCode.hpp"
Expand Down Expand Up @@ -344,7 +344,7 @@ class NetworkReader : public ReaderInterface {
size_t m_buffer_size{cDefaultBufferSize};
size_t m_curr_downloader_buf_idx{0};

std::vector<Array<char>> m_buffer_pool;
std::vector<ystdlib::containers::Array<char>> m_buffer_pool;
std::queue<BufferView> m_filled_buffer_queue;
std::optional<BufferView> m_curr_downloader_buf;
std::optional<BufferView> m_curr_reader_buf;
Expand Down
1 change: 1 addition & 0 deletions components/core/src/clp/clg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ target_link_libraries(clg
${STD_FS_LIBS}
clp::string_utils
yaml-cpp::yaml-cpp
ystdlib::containers
ZStd::ZStd
)
# Put the built executable at the root of the build directory
Expand Down
1 change: 1 addition & 0 deletions components/core/src/clp/clo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ target_link_libraries(clo
${sqlite_LIBRARY_DEPENDENCIES}
${STD_FS_LIBS}
clp::string_utils
ystdlib::containers
ZStd::ZStd
)
# Put the built executable at the root of the build directory
Expand Down
1 change: 1 addition & 0 deletions components/core/src/clp/clp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ target_link_libraries(clp
${STD_FS_LIBS}
clp::string_utils
yaml-cpp::yaml-cpp
ystdlib::containers
ZStd::ZStd
)
# Put the built executable at the root of the build directory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ target_link_libraries(make-dictionaries-readable
log_surgeon::log_surgeon
spdlog::spdlog
clp::string_utils
ystdlib::containers
ZStd::ZStd
)
# Put the built executable at the root of the build directory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#include <sys/stat.h>

#include <fmt/core.h>
#include <ystdlib/containers/Array.hpp>

#include "../Array.hpp"
#include "../FileReader.hpp"

namespace clp::streaming_archive {
Expand All @@ -26,7 +26,7 @@ auto ArchiveMetadata::create_from_file(std::string_view file_path) -> ArchiveMet
throw OperationFailed(clp_rc, __FILENAME__, __LINE__);
}

clp::Array<char> buf{static_cast<size_t>(file_stat.st_size)};
ystdlib::containers::Array<char> buf(static_cast<size_t>(file_stat.st_size));
if (auto const clp_rc = file_reader.try_read_exact_length(buf.data(), buf.size());
clp::ErrorCode::ErrorCode_Success != clp_rc)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#include <cstdint>

#include <lzma.h>
#include <ystdlib/containers/Array.hpp>

#include "../../Array.hpp"
#include "../../ErrorCode.hpp"
#include "../../TraceableException.hpp"
#include "../../WriterInterface.hpp"
Expand Down Expand Up @@ -37,7 +37,8 @@ class Compressor : public ::clp::streaming_compression::Compressor {
Compressor() : Compressor{cDefaultCompressionLevel, cDefaultDictionarySize, LZMA_CHECK_CRC64} {}

Compressor(int compression_level, size_t dict_size, lzma_check check)
: m_lzma_stream{compression_level, dict_size, check} {}
: m_compressed_stream_block_buffer(cCompressedStreamBlockBufferSize),
m_lzma_stream{compression_level, dict_size, check} {}

// Destructor
~Compressor() override = default;
Expand Down Expand Up @@ -224,7 +225,7 @@ class Compressor : public ::clp::streaming_compression::Compressor {
WriterInterface* m_compressed_stream_writer{nullptr};

// Compressed stream variables
Array<uint8_t> m_compressed_stream_block_buffer{cCompressedStreamBlockBufferSize};
ystdlib::containers::Array<uint8_t> m_compressed_stream_block_buffer;
LzmaStream m_lzma_stream;
size_t m_uncompressed_stream_pos{0};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

namespace clp::streaming_compression::zstd {
Compressor::Compressor()
: m_compressed_stream_block{
: m_compressed_stream_block_buffer(ZSTD_CStreamOutSize()),
m_compressed_stream_block{
.dst = m_compressed_stream_block_buffer.data(),
.size = m_compressed_stream_block_buffer.size(),
.pos = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

#include <cstddef>

#include <ystdlib/containers/Array.hpp>
#include <zstd.h>

#include "../../Array.hpp"
#include "../../ErrorCode.hpp"
#include "../../TraceableException.hpp"
#include "../../WriterInterface.hpp"
Expand Down Expand Up @@ -98,7 +98,7 @@ class Compressor : public ::clp::streaming_compression::Compressor {
ZSTD_CStream* m_compression_stream{ZSTD_createCStream()};
bool m_compression_stream_contains_data{false};

Array<char> m_compressed_stream_block_buffer{ZSTD_CStreamOutSize()};
ystdlib::containers::Array<char> m_compressed_stream_block_buffer;
ZSTD_outBuffer m_compressed_stream_block;

size_t m_uncompressed_stream_pos{0};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace clp::streaming_compression::zstd {
Decompressor::Decompressor()
: ::clp::streaming_compression::Decompressor{CompressorType::ZSTD},
m_decompression_stream{ZSTD_createDStream()},
m_unused_decompressed_stream_block_buffer{ZSTD_DStreamOutSize()} {
m_unused_decompressed_stream_block_buffer(ZSTD_DStreamOutSize()) {
if (nullptr == m_decompression_stream) {
SPDLOG_ERROR("streaming_compression::zstd::Decompressor: ZSTD_createDStream() error");
throw OperationFailed(ErrorCode_Failure, __FILENAME__, __LINE__);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
#include <optional>
#include <string>

#include <ystdlib/containers/Array.hpp>
#include <zstd.h>

#include "../../Array.hpp"
#include "../../ReaderInterface.hpp"
#include "../../ReadOnlyMemoryMappedFile.hpp"
#include "../../TraceableException.hpp"
Expand Down Expand Up @@ -136,14 +136,14 @@ class Decompressor : public ::clp::streaming_compression::Decompressor {
ReaderInterface* m_reader{nullptr};
size_t m_reader_initial_pos{0ULL};

std::optional<Array<char>> m_read_buffer;
std::optional<ystdlib::containers::Array<char>> m_read_buffer;
size_t m_read_buffer_length{0ULL};

ZSTD_inBuffer m_compressed_stream_block{};

size_t m_decompressed_stream_pos{0ULL};

Array<char> m_unused_decompressed_stream_block_buffer;
ystdlib::containers::Array<char> m_unused_decompressed_stream_block_buffer;
};
} // namespace clp::streaming_compression::zstd
#endif // CLP_STREAMING_COMPRESSION_ZSTD_DECOMPRESSOR_HPP
1 change: 1 addition & 0 deletions components/core/src/clp_s/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ target_link_libraries(
simdjson
spdlog::spdlog
yaml-cpp::yaml-cpp
ystdlib::containers
ZStd::ZStd
)
target_include_directories(clp-s PRIVATE "${PROJECT_SOURCE_DIR}/submodules")
Expand Down
1 change: 1 addition & 0 deletions components/core/src/clp_s/indexer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ target_link_libraries(indexer
simdjson
spdlog::spdlog
yaml-cpp::yaml-cpp
ystdlib::containers
ZStd::ZStd
)
# Put the built executable at the root of the build directory
Expand Down
57 changes: 0 additions & 57 deletions components/core/tests/test-Array.cpp

This file was deleted.

Loading
Loading