Repository: microsoft/onnxruntime
File: onnxruntime/core/mlas/lib/softmax_kernel_neon_fp16.cpp (C++)

Code before:
    T beta_6;
    T beta_4;
    T beta_2;
    T beta_0;
};

constexpr MlasTanhConstants<_mlas_fp16_> TanhConstantsFp16 = {
    0xc308, // -3.51562
    0x4308, // 3.51562
    0x0001,
    0x00f9,
    0x1138,
    0x1d03,
    0x0014,
    0x07c5,
    0x18a5,
    0x1d03,
};

template <typename T>
MLAS_FORCEINLINE
MlasTanhConstants<T> Get_Tanh_Constants();

template <>
MLAS_FORCEINLINE
MlasTanhConstants<float16x8_t> Get_Tanh_Constants<float16x8_t>() {
    const static MlasTanhConstants<float16x8_t> TanhConstantsFp16x8 = {
        MlasBroadcastFloat16x8(TanhConstantsFp16.LowerRange),
        MlasBroadcastFloat16x8(TanhConstantsFp16.UpperRange),
        MlasBroadcastFloat16x8(TanhConstantsFp16.alpha_7),
        MlasBroadcastFloat16x8(TanhConstantsFp16.alpha_5),
        MlasBroadcastFloat16x8(TanhConstantsFp16.alpha_3),
        MlasBroadcastFloat16x8(TanhConstantsFp16.alpha_1),
        MlasBroadcastFloat16x8(TanhConstantsFp16.beta_6),
        MlasBroadcastFloat16x8(TanhConstantsFp16.beta_4),
        MlasBroadcastFloat16x8(TanhConstantsFp16.beta_2),
        MlasBroadcastFloat16x8(TanhConstantsFp16.beta_0),
    };
    return TanhConstantsFp16x8;
}

template <>
MLAS_FORCEINLINE
MlasTanhConstants<float16x4_t> Get_Tanh_Constants<float16x4_t>() {
    const static MlasTanhConstants<float16x4_t> TanhConstantsFp16x4 = {
        MlasBroadcastFloat16x4(TanhConstantsFp16.LowerRange),
        MlasBroadcastFloat16x4(TanhConstantsFp16.UpperRange),
        MlasBroadcastFloat16x4(TanhConstantsFp16.alpha_7),
        MlasBroadcastFloat16x4(TanhConstantsFp16.alpha_5),
        MlasBroadcastFloat16x4(TanhConstantsFp16.alpha_3),
        MlasBroadcastFloat16x4(TanhConstantsFp16.alpha_1),

Review comment (suggestion):
How about using
```
const MlasTanhConstants<float16x8_t>& Get_Tanh_Constants<float16x8_t>() {
...
}
```

Code after:
    T beta_6;
    T beta_4;
    T beta_2;
    T beta_0;
};

constexpr MlasTanhConstants<_mlas_fp16_> TanhConstantsFp16 = {
    0xc308, // -3.51562
    0x4308, // 3.51562
    0x0001,
    0x00f9,
    0x1138,
    0x1d03,
    0x0014,
    0x07c5,
    0x18a5,
    0x1d03,
};

template <typename T>
MLAS_FORCEINLINE
const MlasTanhConstants<T>& Get_Tanh_Constants();

template <>
MLAS_FORCEINLINE
const MlasTanhConstants<float16x8_t>& Get_Tanh_Constants<float16x8_t>() {
    const static MlasTanhConstants<float16x8_t> TanhConstantsFp16x8 = {
        MlasBroadcastFloat16x8(TanhConstantsFp16.LowerRange),
        MlasBroadcastFloat16x8(TanhConstantsFp16.UpperRange),
        MlasBroadcastFloat16x8(TanhConstantsFp16.alpha_7),
        MlasBroadcastFloat16x8(TanhConstantsFp16.alpha_5),
        MlasBroadcastFloat16x8(TanhConstantsFp16.alpha_3),
        MlasBroadcastFloat16x8(TanhConstantsFp16.alpha_1),
        MlasBroadcastFloat16x8(TanhConstantsFp16.beta_6),
        MlasBroadcastFloat16x8(TanhConstantsFp16.beta_4),
        MlasBroadcastFloat16x8(TanhConstantsFp16.beta_2),
        MlasBroadcastFloat16x8(TanhConstantsFp16.beta_0),
    };
    return TanhConstantsFp16x8;
}

template <>
MLAS_FORCEINLINE
const MlasTanhConstants<float16x4_t>& Get_Tanh_Constants<float16x4_t>() {
    const static MlasTanhConstants<float16x4_t> TanhConstantsFp16x4 = {
        MlasBroadcastFloat16x4(TanhConstantsFp16.LowerRange),
        MlasBroadcastFloat16x4(TanhConstantsFp16.UpperRange),
        MlasBroadcastFloat16x4(TanhConstantsFp16.alpha_7),
        MlasBroadcastFloat16x4(TanhConstantsFp16.alpha_5),
        MlasBroadcastFloat16x4(TanhConstantsFp16.alpha_3),
        MlasBroadcastFloat16x4(TanhConstantsFp16.alpha_1),