8000 make tensor type representation internal by dsyme · Pull Request #176 · DiffSharp/DiffSharp · GitHub
[go: up one dir, main page]

Skip to content

make tensor type representation internal #176

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 3 commits into from
Sep 20, 2020
Merged

make tensor type representation internal #176

merged 3 commits into from
Sep 20, 2020

Conversation

dsyme
Copy link
Collaborator
@dsyme dsyme commented Sep 9, 2020

The cases in the discriminated union should be hidden from the rest of the world so we can change it in the future, and control how the reverse/forward cases are generated

opUnary and opBinary need to be hidden because they are inlined. This relates to #89 where we can provide public entry-points for user-defined extensions

@codecov
Copy link
codecov bot commented Sep 9, 2020

Codecov Report

Merging #176 into dev will increase coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #176      +/-   ##
==========================================
+ Coverage   67.05%   67.09%   +0.04%     
==========================================
  Files          13       13              
  Lines        4835     4835              
  Branches     1202     1202              
==========================================
+ Hits         3242     3244       +2     
+ Misses        930      928       -2     
  Partials      663      663              
Impacted Files Coverage Δ
src/DiffSharp.Core/Tensor.fs 71.59% <ø> (ø)
src/DiffSharp.Core/DiffSharp.fs 35.32% <0.00%> (+0.46%) ⬆️

@dsyme
Copy link
Collaborator Author
dsyme commented Sep 14, 2020

@gbaydin I think we can just pull this - these union cases should be hidden going forward, since the API is used to access/create them

@gbaydin
Copy link
Member
gbaydin commented Sep 20, 2020

@dsyme ok let's do it.

Note: I think that the Tensor, TensorF, TensorR cases should be visible to the user and seeing the discriminated union cases in tensor's string representation was taking care of this in a simple way. This is so that they are aware of what their code is doing in debugging and prototyping.

I don't know if making this internal hides this from the user. I think we can still give this information to the user by simply adding "F" and "R" suffixes somewhere in the Tensor's string representation (which I hope will be shown by default by fsi and dotnet interactive).

@gbaydin gbaydin merged commit d284121 into DiffSharp:dev Sep 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0