DoxigAlpha

setFeature

Function parameters

Parameters

#
Feature:type
cpu:*Target.Cpu
feature:Feature
enabled:bool

Type definitions in this namespace

Types

#

Functions in this namespace

Functions

#
detectRuntimeVersion
Returns the highest known WindowsVersion deduced from reported runtime information.

Source

Implementation

#
fn setFeature(comptime Feature: type, cpu: *Target.Cpu, feature: Feature, enabled: bool) void {
    const idx = @as(Target.Cpu.Feature.Set.Index, @intFromEnum(feature));

    if (enabled) cpu.features.addFeature(idx) else cpu.features.removeFeature(idx);
}