From 2f55d46da10cd7dd7ca9d1e9bfbd6fa5a0084a47 Mon Sep 17 00:00:00 2001 From: DmitriyMusatkin Date: Thu, 5 Sep 2024 09:42:02 -0700 Subject: [PATCH] minor --- CMakeLists.txt | 1 - include/aws/checksums/private/crc64_priv.h | 18 +++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7741e54..c473544 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -114,7 +114,6 @@ if (USE_CPU_EXTENSIONS) # this file routes all of the implementations together based on available cpu features. It gets built regardless # of which flags exist. The c file sorts it out. simd_append_source_and_features(${PROJECT_NAME} "source/intel/intrin/crc32c_sse42_avx512.c" ${UBER_FILE_FLAGS}) - #simd_append_source_and_features(${PROJECT_NAME} "source/intel/intrin/crc32_hw.c" ${UBER_FILE_FLAGS}) if (AWS_HAVE_CLMUL) simd_append_source_and_features(${PROJECT_NAME} "source/intel/intrin/crc64nvme_clmul.c" ${AWS_AVX2_FLAG} ${AWS_CLMUL_FLAG} ${AWS_SSE4_2_FLAG}) diff --git a/include/aws/checksums/private/crc64_priv.h b/include/aws/checksums/private/crc64_priv.h index 6b4b7e2..f070dd7 100644 --- a/include/aws/checksums/private/crc64_priv.h +++ b/include/aws/checksums/private/crc64_priv.h @@ -32,15 +32,15 @@ uint64_t aws_checksums_crc64nvme_arm_pmull(const uint8_t *input, int length, uin /* Pre-computed constants for CRC64 */ typedef struct { - uint64_t x2048[8]; // x^2112 mod P(x) / x^2048 mod P(x) - uint64_t x1536[8]; // x^1600 mod P(x) / x^1536 mod P(x) - uint64_t x1024[8]; // x^1088 mod P(x) / x^1024 mod P(x) - uint64_t x512[8]; // x^576 mod P(x) / x^512 mod P(x) - uint64_t x384[2]; // x^448 mod P(x) / x^384 mod P(x) - uint64_t x256[2]; // x^320 mod P(x) / x^256 mod P(x) - uint64_t x128[2]; // x^192 mod P(x) / x^128 mod P(x) - uint64_t mu_poly[2]; // Barrett mu / polynomial P(x) - uint64_t trailing[15][2]; // Folding constants for 15 possible trailing input data lengths + uint64_t x2048[8]; /* x^2112 mod P(x) / x^2048 mod P(x) */ + uint64_t x1536[8]; /* x^1600 mod P(x) / x^1536 mod P(x) */ + uint64_t x1024[8]; /* x^1088 mod P(x) / x^1024 mod P(x) */ + uint64_t x512[8]; /* x^576 mod P(x) / x^512 mod P(x) */ + uint64_t x384[2]; /* x^448 mod P(x) / x^384 mod P(x) */ + uint64_t x256[2]; /* x^320 mod P(x) / x^256 mod P(x) */ + uint64_t x128[2]; /* x^192 mod P(x) / x^128 mod P(x) */ + uint64_t mu_poly[2]; /* Barrett mu / polynomial P(x) */ + uint64_t trailing[15][2]; /* Folding constants for 15 possible trailing input data lengths */ } aws_checksums_crc64_constants_t; extern uint8_t aws_checksums_masks_shifts[6][16];