include: reformat using new code style

Signed-off-by: Marcel Cornu <marcel.d.cornu@intel.com>
This commit is contained in:
Marcel Cornu
2024-04-19 17:09:27 +01:00
committed by Pablo de Lara
parent 55fbfabfc6
commit fa5b8baf84
10 changed files with 1013 additions and 890 deletions

View File

@@ -27,13 +27,11 @@
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**********************************************************************/
/**
* @file crc64.h
* @brief CRC64 functions.
*/
#ifndef _CRC64_H_
#define _CRC64_H_
@@ -43,7 +41,6 @@
extern "C" {
#endif
/* Multi-binary functions */
/**
@@ -54,11 +51,11 @@ extern "C" {
* selects the appropriate version at runtime.
* @returns 64 bit CRC
*/
uint64_t crc64_ecma_refl(
uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
uint64_t
crc64_ecma_refl(uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
/**
* @brief Generate CRC from ECMA-182 standard in normal format, runs
@@ -68,11 +65,11 @@ uint64_t crc64_ecma_refl(
* selects the appropriate version at runtime.
* @returns 64 bit CRC
*/
uint64_t crc64_ecma_norm(
uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
uint64_t
crc64_ecma_norm(uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
/**
* @brief Generate CRC from ISO standard in reflected format, runs
@@ -82,11 +79,11 @@ uint64_t crc64_ecma_norm(
* selects the appropriate version at runtime.
* @returns 64 bit CRC
*/
uint64_t crc64_iso_refl(
uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
uint64_t
crc64_iso_refl(uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
/**
* @brief Generate CRC from ISO standard in normal format, runs
@@ -96,11 +93,11 @@ uint64_t crc64_iso_refl(
* selects the appropriate version at runtime.
* @returns 64 bit CRC
*/
uint64_t crc64_iso_norm(
uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
uint64_t
crc64_iso_norm(uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
/**
* @brief Generate CRC from "Jones" coefficients in reflected format, runs
@@ -110,11 +107,11 @@ uint64_t crc64_iso_norm(
* selects the appropriate version at runtime.
* @returns 64 bit CRC
*/
uint64_t crc64_jones_refl(
uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
uint64_t
crc64_jones_refl(uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
/**
* @brief Generate CRC from "Jones" coefficients in normal format, runs
@@ -124,11 +121,11 @@ uint64_t crc64_jones_refl(
* selects the appropriate version at runtime.
* @returns 64 bit CRC
*/
uint64_t crc64_jones_norm(
uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
uint64_t
crc64_jones_norm(uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
/**
* @brief Generate CRC from "Rocksoft" coefficients in reflected format, runs
@@ -138,11 +135,11 @@ uint64_t crc64_jones_norm(
* selects the appropriate version at runtime.
* @returns 64 bit CRC
*/
uint64_t crc64_rocksoft_refl(
uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
uint64_t
crc64_rocksoft_refl(uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
/**
* @brief Generate CRC from "Rocksoft" coefficients in normal format, runs
@@ -152,11 +149,11 @@ uint64_t crc64_rocksoft_refl(
* selects the appropriate version at runtime.
* @returns 64 bit CRC
*/
uint64_t crc64_rocksoft_norm(
uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
uint64_t
crc64_rocksoft_norm(uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
/* Arch specific versions */
@@ -167,11 +164,11 @@ uint64_t crc64_rocksoft_norm(
* @returns 64 bit CRC
*/
uint64_t crc64_ecma_refl_by8(
uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
uint64_t
crc64_ecma_refl_by8(uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
/**
* @brief Generate CRC from ECMA-182 standard in normal format.
@@ -180,31 +177,31 @@ uint64_t crc64_ecma_refl_by8(
* @returns 64 bit CRC
*/
uint64_t crc64_ecma_norm_by8(
uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
uint64_t
crc64_ecma_norm_by8(uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
/**
* @brief Generate CRC from ECMA-182 standard in reflected format, runs baseline version
* @returns 64 bit CRC
*/
uint64_t crc64_ecma_refl_base(
uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
uint64_t
crc64_ecma_refl_base(uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
/**
* @brief Generate CRC from ECMA-182 standard in normal format, runs baseline version
* @returns 64 bit CRC
*/
uint64_t crc64_ecma_norm_base(
uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
uint64_t
crc64_ecma_norm_base(uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
/**
* @brief Generate CRC from ISO standard in reflected format.
@@ -213,11 +210,11 @@ uint64_t crc64_ecma_norm_base(
* @returns 64 bit CRC
*/
uint64_t crc64_iso_refl_by8(
uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
uint64_t
crc64_iso_refl_by8(uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
/**
* @brief Generate CRC from ISO standard in normal format.
@@ -226,31 +223,31 @@ uint64_t crc64_iso_refl_by8(
* @returns 64 bit CRC
*/
uint64_t crc64_iso_norm_by8(
uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
uint64_t
crc64_iso_norm_by8(uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
/**
* @brief Generate CRC from ISO standard in reflected format, runs baseline version
* @returns 64 bit CRC
*/
uint64_t crc64_iso_refl_base(
uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
uint64_t
crc64_iso_refl_base(uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
/**
* @brief Generate CRC from ISO standard in normal format, runs baseline version
* @returns 64 bit CRC
*/
uint64_t crc64_iso_norm_base(
uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
uint64_t
crc64_iso_norm_base(uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
/**
* @brief Generate CRC from "Jones" coefficients in reflected format.
@@ -259,11 +256,11 @@ uint64_t crc64_iso_norm_base(
* @returns 64 bit CRC
*/
uint64_t crc64_jones_refl_by8(
uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
uint64_t
crc64_jones_refl_by8(uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
/**
* @brief Generate CRC from "Jones" coefficients in normal format.
@@ -272,31 +269,31 @@ uint64_t crc64_jones_refl_by8(
* @returns 64 bit CRC
*/
uint64_t crc64_jones_norm_by8(
uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
uint64_t
crc64_jones_norm_by8(uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
/**
* @brief Generate CRC from "Jones" coefficients in reflected format, runs baseline version
* @returns 64 bit CRC
*/
uint64_t crc64_jones_refl_base(
uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
uint64_t
crc64_jones_refl_base(uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
/**
* @brief Generate CRC from "Jones" coefficients in normal format, runs baseline version
* @returns 64 bit CRC
*/
uint64_t crc64_jones_norm_base(
uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
uint64_t
crc64_jones_norm_base(uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
/**
* @brief Generate CRC from "Rocksoft" coefficients in reflected format.
@@ -305,21 +302,21 @@ uint64_t crc64_jones_norm_base(
* @returns 64 bit CRC
*/
uint64_t crc64_rocksoft_refl_by8(
uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
uint64_t
crc64_rocksoft_refl_by8(uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
/**
* @brief Generate CRC from "Rocksoft" coefficients in reflected format, runs baseline version
* @returns 64 bit CRC
*/
uint64_t crc64_rocksoft_refl_base(
uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
uint64_t
crc64_rocksoft_refl_base(uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
/**
* @brief Generate CRC from "Rocksoft" coefficients in normal format.
@@ -328,21 +325,21 @@ uint64_t crc64_rocksoft_refl_base(
* @returns 64 bit CRC
*/
uint64_t crc64_rocksoft_norm_by8(
uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
uint64_t
crc64_rocksoft_norm_by8(uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
/**
* @brief Generate CRC from "Rocksoft" coefficients in normal format, runs baseline version
* @returns 64 bit CRC
*/
uint64_t crc64_rocksoft_norm_base(
uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
uint64_t
crc64_rocksoft_norm_base(uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
#ifdef __cplusplus
}