File: igt_crc.h

package info (click to toggle)
intel-gpu-tools 1.27.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 54,600 kB
  • sloc: xml: 741,155; ansic: 249,033; yacc: 2,781; python: 2,064; sh: 847; perl: 796; lex: 487; asm: 219; makefile: 27
file content (31 lines) | stat: -rw-r--r-- 677 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// SPDX-License-Identifier: MIT
/*
 * Copyright © 2022 Intel Corporation
 */

#ifndef __IGT_CRC_H__
#define __IGT_CRC_H__

#include <stddef.h>
#include <stdint.h>

/**
 * SECTION:igt_crc
 * @short_description: igt crc tables and calculation functions
 * @title: CRC
 * @include: igt_crc.h
 *
 * # Introduction
 *
 * Providing vendor agnostic crc calculation is useful to avoid code
 * duplication. Especially if vendor will decide to do on-gpu crc calculation
 * it will need to inject crc table to gpu.
 *
 * All crc tables are globals to allow direct in-code use.
 */

extern const uint32_t igt_crc32_tab[256];

uint32_t igt_cpu_crc32(const void *buf, size_t size);

#endif