blob: ba73eb23407b4f0096ae531b56f9c25efdeadd8a (
plain)
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
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Runtime.Intrinsics;
namespace System.Runtime.Intrinsics.X86
{
/// <summary>
/// This class provides access to Intel POPCNT hardware instructions via intrinsics
/// </summary>
[CLSCompliant(false)]
public abstract class Popcnt : Sse42
{
internal Popcnt() { }
public new static bool IsSupported { get => IsSupported; }
/// <summary>
/// int _mm_popcnt_u32 (unsigned int a)
/// POPCNT reg, reg/m32
/// </summary>
public static uint PopCount(uint value) => PopCount(value);
/// <summary>
/// __int64 _mm_popcnt_u64 (unsigned __int64 a)
/// POPCNT reg, reg/m64
/// </summary>
public static ulong PopCount(ulong value) => PopCount(value);
}
}
|