Skip to content
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

Update documentation for System.Numerics.Vector<T> to be more explicit. #23283

Closed
tannergooding opened this issue Aug 21, 2017 · 4 comments · Fixed by dotnet/dotnet-api-docs#3334
Labels
area-System.Numerics documentation Documentation bug or enhancement, does not impact product or test code good first issue Issue should be easy to implement, good for first-time contributors help wanted [up-for-grabs] Good issue for external contributors
Milestone

Comments

@tannergooding
Copy link
Member

This was raised in the dotnet/corefx gitter channel.

It is not currently clear from the documentation that the types exposed by the System.Numerics.Vectors assembly are not meant for general purpose Vector operations and that the types are heavily tied to the underlying hardware.

The documentation for this could be greatly improved.

Some types, such as Vector<T> should have explicit (and readily visible) documentation that its element count is limited to Vector<T>.Count, and that certain methods (such as the Vector(T[]) constructor) will only use the first Vector<T>.Count elements and ignore the remaining.

@aliostad
Copy link

Thank you!

@danmoseley
Copy link
Member

I think this issue probably should be in https://github.com/dotnet/docs.

@karelz
Copy link
Member

karelz commented Aug 22, 2017

We need to propose wording changes in docs, then move it to docs repo.
Anyone interested?

@Gnbrkm41
Copy link
Contributor

Opened a fix PR that (hopefully) points these out in dotnet/dotnet-api-docs repo.

carlossanlop referenced this issue in dotnet/dotnet-api-docs Jan 6, 2020
* Update System.Numerics.Vector documents

* Emphasise that this type is not appropriate for general purpose vector operations
* Update ctor remarks so that only primitive numeric types are allowed
* Update ctor remarks so that only the first `Vector<T>.Count` elements are added to the vector (for Span/Array overloads)
* Add information about exception that can be thrown when array.Length < Vector<T>.Count

Related: https://github.com/dotnet/corefx/issues/23448

* Apply suggestions

* Pull the type constraint to the top of the ctor docs since it's shared throughout, list out the types for future-proofing
* Update param descriptions for array/spans to be explicit about the remainders

Part of dotnet-api-docs/#3334

Co-Authored-By: Tanner Gooding <tagoo@outlook.com>

* Use see tag

* Reference the type instead of just writing it out

* Define the meaning of primitive numeric data type

* Pluralise "instance"

Co-authored-by: Tanner Gooding <tagoo@outlook.com>
@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the Future milestone Jan 31, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Numerics documentation Documentation bug or enhancement, does not impact product or test code good first issue Issue should be easy to implement, good for first-time contributors help wanted [up-for-grabs] Good issue for external contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants