-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Fix method names of hardware intrinsic APIs #15471
Conversation
@@ -263,19 +263,19 @@ public static class Sse2 | |||
/// <summary> | |||
/// __m128i _mm_cvtps_epi32 (__m128 a) | |||
/// </summary> | |||
public static Vector128<int> ConvertToInt(Vector128<float> value) { throw new PlatformNotSupportedException(); } | |||
public static Vector128<int> ConvertToInt32(Vector128<float> value) { throw new PlatformNotSupportedException(); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be ConvertToVector128Int32
to match the naming convention the other methods have been given.
/// <summary> | ||
/// __m128i _mm_cvtpd_epi32 (__m128d a) | ||
/// </summary> | ||
public static Vector128<int> ConvertToInt(Vector128<double> value) { throw new PlatformNotSupportedException(); } | ||
public static Vector128<int> ConvertToInt32(Vector128<double> value) { throw new PlatformNotSupportedException(); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
/// <summary> | ||
/// __m128 _mm_cvtepi32_ps (__m128i a) | ||
/// </summary> | ||
public static Vector128<float> ConvertToFloat(Vector128<int> value) { throw new PlatformNotSupportedException(); } | ||
public static Vector128<float> ConvertToSingle(Vector128<int> value) { throw new PlatformNotSupportedException(); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
/// <summary> | ||
/// __m128 _mm_cvtpd_ps (__m128d a) | ||
/// </summary> | ||
public static Vector128<float> ConvertToFloat(Vector128<double> value) { throw new PlatformNotSupportedException(); } | ||
public static Vector128<float> ConvertToSingle(Vector128<double> value) { throw new PlatformNotSupportedException(); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
@@ -288,11 +288,11 @@ public static class Sse2 | |||
/// <summary> | |||
/// __m128i _mm_cvttps_epi32 (__m128 a) | |||
/// </summary> | |||
public static Vector128<int> ConvertToIntWithTruncation(Vector128<float> value) { throw new PlatformNotSupportedException(); } | |||
public static Vector128<int> ConvertToInt32WithTruncation(Vector128<float> value) { throw new PlatformNotSupportedException(); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ConvertToVector128Int32WithTruncation
/// <summary> | ||
/// __m128i _mm_cvttpd_epi32 (__m128d a) | ||
/// </summary> | ||
public static Vector128<int> ConvertToIntWithTruncation(Vector128<double> value) { throw new PlatformNotSupportedException(); } | ||
public static Vector128<int> ConvertToInt32WithTruncation(Vector128<double> value) { throw new PlatformNotSupportedException(); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Will fix.
cc @eerhardt |
FYI @KrzysztofCwalina @karelz @terrajobst This is changing shape of Intel intrinsics that was approved earlier. It looks like an oversight to me that can just go in without review. |
@fiigii Could you please prepare PR with a matching change in CoreFX? |
#15341 is adding new public APIs. Adding new APIs does not break anything. It does not need to be done in lock step. Your change is changing existing public APIs, and thus it needs to be done in lock step. |
@jkotas Thank you for explaining, will submit the CoreFX PR. |
@fiigii, since they are also naming issues. There are a few other inconsistencies that would be nice to fix. We use We use |
Ok, will make consistent to
Will change to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New naming looks good me as it's making things more consistent with prior art. LGTM.
60889e7
to
4360c89
Compare
@tannergooding PTAL. I will make the CoreFX PR if this looks good to you. |
CoreFX PR dotnet/corefx#25965 |
Avoid language-specific type names in hardware intrinsic APIs. Discussed in #15341 (comment)
@tannergooding @jkotas