| 11 | == Interface == |
| 12 | |
| 13 | This library provides the following functions for general-purpose use. For most applications, only crc64_omp (and possibly crc64_invert) will be of use: |
| 14 | |
| 15 | |
| 16 | Calculate the CRC64 of the provided buffer (in serial). |
| 17 | {{{ |
| 18 | uint64_t crc64(const void *input, size_t nbytes); |
| 19 | }}} |
| 20 | |
| 21 | Calculate the CRC64 of the provided buffer, in parallel if possible (using OpenMP). |
| 22 | {{{ |
| 23 | uint64_t crc64_omp(const void *input, size_t nbytes); |
| 24 | }}} |
| 25 | |
| 26 | Calculate the 'check bytes' for the provided CRC64. If these bytes are appended to the original buffer, then the new total CRC64 should be -1. The CRC64 of the buffer is provided as is a pointer to the end of the buffer (where the inverted CRC will be written). The end-of-buffer pointer need not be aligned. |
| 27 | {{{ |
| 28 | void crc64_invert(uint64_t cs, void *buffer); |
| 29 | }}} |
| 30 | |
| 31 | Given the CRC64 of the first part of a buffer, and the CRC64 and length of the second part of a buffer, calculate the CRC64 of the complete buffer. |
| 32 | {{{ |
| 33 | uint64_t crc64_combine(uint64_t cs1, uint64_t cs2, size_t nbytes2); |
| 34 | }}} |
| 35 | |