Skip to content

Commit 3b3af0d

Browse files
committed
Merge remote-tracking branch 'origin/sycl-rel-6_1_0' into private/asachkov/refresh-ci-scripts
2 parents 2ede4ca + cba981a commit 3b3af0d

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

sycl/source/detail/compression.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ class ZSTDCompressor {
4141
public:
4242
// Blob (de)compression do not assume format/structure of the input buffer.
4343
// This function can be used in future for compression in on-disk cache.
44-
static std::unique_ptr<char> CompressBlob(const char *src, size_t srcSize,
45-
size_t &dstSize, int level) {
44+
static std::unique_ptr<char[]> CompressBlob(const char *src, size_t srcSize,
45+
size_t &dstSize, int level) {
4646
auto &instance = GetSingletonInstance();
4747

4848
// Lazy initialize compression context.
@@ -61,7 +61,7 @@ class ZSTDCompressor {
6161

6262
// Get maximum size of the compressed buffer and allocate it.
6363
auto dstBufferSize = ZSTD_compressBound(srcSize);
64-
auto dstBuffer = std::unique_ptr<char>(new char[dstBufferSize]);
64+
auto dstBuffer = std::make_unique<char[]>(dstBufferSize);
6565

6666
if (!dstBuffer)
6767
throw sycl::exception(sycl::make_error_code(sycl::errc::runtime),
@@ -93,8 +93,8 @@ class ZSTDCompressor {
9393
return dstBufferSize;
9494
}
9595

96-
static std::unique_ptr<char> DecompressBlob(const char *src, size_t srcSize,
97-
size_t &dstSize) {
96+
static std::unique_ptr<char[]> DecompressBlob(const char *src, size_t srcSize,
97+
size_t &dstSize) {
9898
auto &instance = GetSingletonInstance();
9999

100100
// Lazy initialize decompression context.
@@ -116,7 +116,7 @@ class ZSTDCompressor {
116116
auto dstBufferSize = GetDecompressedSize(src, srcSize);
117117

118118
// Allocate buffer for decompressed data.
119-
auto dstBuffer = std::unique_ptr<char>(new char[dstBufferSize]);
119+
auto dstBuffer = std::make_unique<char[]>(dstBufferSize);
120120

121121
if (!dstBuffer)
122122
throw sycl::exception(sycl::make_error_code(sycl::errc::runtime),

sycl/source/detail/device_binary_image.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ class CompressedRTDeviceBinaryImage : public RTDeviceBinaryImage {
306306
}
307307

308308
private:
309-
std::unique_ptr<char> m_DecompressedData;
309+
std::unique_ptr<char[]> m_DecompressedData;
310310
size_t m_ImageSize;
311311
};
312312
#endif // SYCL_RT_ZSTD_NOT_AVAIABLE

0 commit comments

Comments
 (0)