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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
//! Kernel dispatch introspection for verifying optimization.
//!
//! This module provides user-friendly APIs to inspect which kernels are selected
//! for the current platform, without impacting hot-path performance.
//!
//! # Examples
//!
//! ```
//! use rscrypto::checksum::{
//! Crc64,
//! introspect::{DispatchInfo, KernelIntrospect},
//! };
//!
//! // Platform-level info
//! let info = DispatchInfo::current();
//! assert!(!format!("{info}").is_empty());
//!
//! // Per-algorithm kernel selection
//! assert!(!Crc64::kernel_name_for_len(1024).is_empty());
//! assert!(!Crc64::kernel_name_for_len(4096).is_empty());
//! ```
pub use crate::;
/// Returns the kernel name selected for a specific algorithm and buffer size.
///
/// This is useful for verifying size-based kernel transitions.
///
/// # Examples
///
/// ```
/// use rscrypto::checksum::{Crc64, introspect::kernel_for};
///
/// // Check kernel selection at different buffer sizes
/// let small = kernel_for::<Crc64>(64);
/// let large = kernel_for::<Crc64>(65536);
/// assert!(!small.is_empty());
/// assert!(!large.is_empty());
/// ```