Skip to content

Standardize to NotSupportedException in TensorPrimitives operators #98162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18303,9 +18303,9 @@ internal readonly struct RoundFallbackOperator<T>(int digits, MidpointRounding m
public static bool Vectorizable => false; // TODO: vectorize for float

public static int Invoke(T x) => T.ILogB(x);
public static Vector128<int> Invoke(Vector128<T> x) => throw new NotImplementedException();
public static Vector256<int> Invoke(Vector256<T> x) => throw new NotImplementedException();
public static Vector512<int> Invoke(Vector512<T> x) => throw new NotImplementedException();
public static Vector128<int> Invoke(Vector128<T> x) => throw new NotSupportedException();
public static Vector256<int> Invoke(Vector256<T> x) => throw new NotSupportedException();
public static Vector512<int> Invoke(Vector512<T> x) => throw new NotSupportedException();
}

/// <summary>double.ILogB(x)</summary>
Expand All @@ -18314,9 +18314,9 @@ internal readonly struct RoundFallbackOperator<T>(int digits, MidpointRounding m
public static bool Vectorizable => false; // TODO: vectorize

public static int Invoke(double x) => double.ILogB(x);
public static Vector128<int> Invoke(Vector128<double> lower, Vector128<double> upper) => throw new NotImplementedException();
public static Vector256<int> Invoke(Vector256<double> lower, Vector256<double> upper) => throw new NotImplementedException();
public static Vector512<int> Invoke(Vector512<double> lower, Vector512<double> upper) => throw new NotImplementedException();
public static Vector128<int> Invoke(Vector128<double> lower, Vector128<double> upper) => throw new NotSupportedException();
public static Vector256<int> Invoke(Vector256<double> lower, Vector256<double> upper) => throw new NotSupportedException();
public static Vector512<int> Invoke(Vector512<double> lower, Vector512<double> upper) => throw new NotSupportedException();
}

/// <summary>T.CreateChecked(x)</summary>
Expand All @@ -18325,9 +18325,9 @@ internal readonly struct RoundFallbackOperator<T>(int digits, MidpointRounding m
public static bool Vectorizable => false;

public static TTo Invoke(TFrom x) => TTo.CreateChecked(x);
public static Vector128<TTo> Invoke(Vector128<TFrom> x) => throw new NotImplementedException();
public static Vector256<TTo> Invoke(Vector256<TFrom> x) => throw new NotImplementedException();
public static Vector512<TTo> Invoke(Vector512<TFrom> x) => throw new NotImplementedException();
public static Vector128<TTo> Invoke(Vector128<TFrom> x) => throw new NotSupportedException();
public static Vector256<TTo> Invoke(Vector256<TFrom> x) => throw new NotSupportedException();
public static Vector512<TTo> Invoke(Vector512<TFrom> x) => throw new NotSupportedException();
}

/// <summary>T.CreateSaturating(x)</summary>
Expand All @@ -18336,9 +18336,9 @@ internal readonly struct RoundFallbackOperator<T>(int digits, MidpointRounding m
public static bool Vectorizable => false;

public static TTo Invoke(TFrom x) => TTo.CreateSaturating(x);
public static Vector128<TTo> Invoke(Vector128<TFrom> x) => throw new NotImplementedException();
public static Vector256<TTo> Invoke(Vector256<TFrom> x) => throw new NotImplementedException();
public static Vector512<TTo> Invoke(Vector512<TFrom> x) => throw new NotImplementedException();
public static Vector128<TTo> Invoke(Vector128<TFrom> x) => throw new NotSupportedException();
public static Vector256<TTo> Invoke(Vector256<TFrom> x) => throw new NotSupportedException();
public static Vector512<TTo> Invoke(Vector512<TFrom> x) => throw new NotSupportedException();
}

/// <summary>T.CreateTruncating(x)</summary>
Expand All @@ -18347,9 +18347,9 @@ internal readonly struct RoundFallbackOperator<T>(int digits, MidpointRounding m
public static bool Vectorizable => false;

public static TTo Invoke(TFrom x) => TTo.CreateTruncating(x);
public static Vector128<TTo> Invoke(Vector128<TFrom> x) => throw new NotImplementedException();
public static Vector256<TTo> Invoke(Vector256<TFrom> x) => throw new NotImplementedException();
public static Vector512<TTo> Invoke(Vector512<TFrom> x) => throw new NotImplementedException();
public static Vector128<TTo> Invoke(Vector128<TFrom> x) => throw new NotSupportedException();
public static Vector256<TTo> Invoke(Vector256<TFrom> x) => throw new NotSupportedException();
public static Vector512<TTo> Invoke(Vector512<TFrom> x) => throw new NotSupportedException();
}

/// <summary>(uint)float</summary>
Expand Down Expand Up @@ -18993,9 +18993,9 @@ static Vector512<uint> SingleToHalfAsWidenedUInt32(Vector512<float> value)
public static bool Vectorizable => false; // TODO: vectorize

public static (T, T) Invoke(T x) => T.SinCos(x);
public static (Vector128<T> First, Vector128<T> Second) Invoke(Vector128<T> x) => throw new NotImplementedException();
public static (Vector256<T> First, Vector256<T> Second) Invoke(Vector256<T> x) => throw new NotImplementedException();
public static (Vector512<T> First, Vector512<T> Second) Invoke(Vector512<T> x) => throw new NotImplementedException();
public static (Vector128<T> First, Vector128<T> Second) Invoke(Vector128<T> x) => throw new NotSupportedException();
public static (Vector256<T> First, Vector256<T> Second) Invoke(Vector256<T> x) => throw new NotSupportedException();
public static (Vector512<T> First, Vector512<T> Second) Invoke(Vector512<T> x) => throw new NotSupportedException();
}

/// <summary>T.SinCosPi(x)</summary>
Expand All @@ -19004,9 +19004,9 @@ static Vector512<uint> SingleToHalfAsWidenedUInt32(Vector512<float> value)
public static bool Vectorizable => false; // TODO: vectorize

public static (T, T) Invoke(T x) => T.SinCosPi(x);
public static (Vector128<T> First, Vector128<T> Second) Invoke(Vector128<T> x) => throw new NotImplementedException();
public static (Vector256<T> First, Vector256<T> Second) Invoke(Vector256<T> x) => throw new NotImplementedException();
public static (Vector512<T> First, Vector512<T> Second) Invoke(Vector512<T> x) => throw new NotImplementedException();
public static (Vector128<T> First, Vector128<T> Second) Invoke(Vector128<T> x) => throw new NotSupportedException();
public static (Vector256<T> First, Vector256<T> Second) Invoke(Vector256<T> x) => throw new NotSupportedException();
public static (Vector512<T> First, Vector512<T> Second) Invoke(Vector512<T> x) => throw new NotSupportedException();
}

/// <summary>Operator that takes one input value and returns a single value.</summary>
Expand Down