Repository navigation
Specialize Grid for Int and Long - #3428
Merged
Merged
Conversation
pomadchin
commented
Oct 19, 2021
| import spire.implicits._ | ||
|
|
||
| abstract class Grid[N: Integral] extends Serializable { | ||
| abstract class Grid[@specialized(Int, Long) N: Integral] extends Serializable { |
Member
Author
There was a problem hiding this comment.
[warn] geotrellis/raster/src/main/scala/geotrellis/raster/GridExtent.scala:36:7: class Grid must be a trait. Specialized version of class GridExtent will inherit generic geotrellis.raster.Grid[Int]
[warn] class GridExtent[@specialized(Int, Long) N: Integral](
[warn] ^
[warn] one warning found
Member
Author
There was a problem hiding this comment.
scala/bug#8405 Grid should be converted into a trait.
pomadchin
force-pushed
the
fix/grid-boxing
branch
from
October 19, 2021 03:03
6bff649 to
62ef656
Compare
pomadchin
commented
Oct 19, 2021
| * provided cols and rows (dimensions). | ||
| */ | ||
| class GridExtent[@specialized(Int, Long) N: Integral]( | ||
| class GridExtent[N: Integral]( |
Member
Author
There was a problem hiding this comment.
Having a specialized trait is enough!
Member
There was a problem hiding this comment.
Interesting... That's really good to know.
pomadchin
commented
Oct 19, 2021
| val cols: N, | ||
| val rows: N | ||
| ) extends Grid[N] with Serializable { | ||
| ) extends GridIntegral[N] { |
Member
Author
There was a problem hiding this comment.
trait Grid[N] extends Serializable
pomadchin
force-pushed
the
fix/grid-boxing
branch
from
October 19, 2021 03:05
62ef656 to
31a3378
Compare
pomadchin
force-pushed
the
fix/grid-boxing
branch
from
October 19, 2021 03:19
31a3378 to
6a0f8f3
Compare
echeipesh
approved these changes
Oct 19, 2021
echeipesh
left a comment
Contributor
There was a problem hiding this comment.
Nice bit of detective work.
pomadchin
force-pushed
the
fix/grid-boxing
branch
from
October 19, 2021 12:26
6a0f8f3 to
8e1bacd
Compare
metasim
approved these changes
Oct 19, 2021
metasim
left a comment
Member
There was a problem hiding this comment.
Thanks so much for doing all this work!
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Checklist
Closes #3427