Skip to main content

Build

Struct Build 

Source
pub struct Build { /* private fields */ }
Expand description

构建配置

Implementations§

Source§

impl Build

Source

pub fn new() -> Self

创建默认构建配置。

默认启用 FAT_RUNTIME(ARM ASIMD/SVE/SVE2 运行时分发), 禁用 USE_CPU_NATIVE(避免绑定到编译机器的 CPU 特性)。

Source

pub fn fat_runtime(&mut self, v: bool) -> &mut Self

启用/禁用 FAT_RUNTIME(运行时 CPU 分发,ARM 平台默认启用)

Source

pub fn build(&mut self) -> Artifacts

执行 cmake 构建,编译 Vectorscan 静态库。

cmake flags:

  • BUILD_STATIC_LIBS=ON: 编译静态库
  • FAT_RUNTIME=ON: ARM 运行时 CPU 特性调度
  • USE_CPU_NATIVE=OFF: 不针对编译机器 CPU 优化(保证跨机型可移植)
  • BUILD_UNIT=OFF: 跳过单元测试编译
  • BUILD_SIMDE_BACKEND 保持默认 OFF(ARM 使用 NEON/SVE2 原生后端)

Auto Trait Implementations§

§

impl Freeze for Build

§

impl RefUnwindSafe for Build

§

impl Send for Build

§

impl Sync for Build

§

impl Unpin for Build

§

impl UnsafeUnpin for Build

§

impl UnwindSafe for Build

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.