Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
target in multiversion - Rust
[go: Go Back, main page]

Attribute Macro multiversion::target

source ·
#[target]
Expand description

Provides a less verbose equivalent to the cfg(target_arch) and target_feature attributes.

A function tagged with #[target("x86_64+avx+avx2")], for example, is equivalent to a function tagged with each of:

  • #[cfg(target_arch = "x86_64")]
  • #[target_feature(enable = "avx")]
  • #[target_feature(enable = "avx2")]

The target attribute is intended to be used in tandem with the multiversion attribute to produce hand-written multiversioned functions.