-
Notifications
You must be signed in to change notification settings - Fork 157
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
Improve C++ source and header organization #663
Comments
Considering most our c++ primitives are 1-1 exposed to cuspatial python, perhaps we can try mirroring the cuspatial python taxonomy until something breaks? Another elephant in the room is that when we merge
|
Fixes #663. Also fixes #1105 Organizes all source, test, and benchmark files into directories matching the names of the associated headers that define the APIs they implement/test/benchmark. Also fixes up documentation so it is consistent with this. Authors: - Mark Harris (https://github.com/harrism) Approvers: - Paul Taylor (https://github.com/trxcllnt) - H. Thomson Comer (https://github.com/thomcom) - Michael Wang (https://github.com/isVoid) URL: #1115
** Update: converting to epic/tasklist **
Tasks
Is your feature request related to a problem? Please describe.
I think we should organize our headers and source better. To make implementations, tests, and benchmarks easier to find and navigate, I would like the directories of source files, tests, and benchmarks to match the names of the API header that they implement. Currently this is not strictly true. Here is the current include tree (ignoring
experimental
directory)Note that this is relatively flat -- algorithms are in top level headers, with the exception of linestring_distance.hpp. Another library that takes this flat approach is Thrust. It's nice that it's mostly easy to include things:
Thrust iterators are an exception:
There is a natural tradeoff between ease of including headers, and clutter when browsing the include directory. However, if there is a natural logical grouping of headers (as with Thrust iterators), then they can be grouped in directories. But this grouping can happen in many ways, and therefore leads to much bikeshedding with lots of discussion about noun-form group names vs. verb-form group names, as we experienced in #644.
cuspatial/cpp/src
directory already does some of this grouping, which doesn't match thecuspatial/cpp/include
directory at all:I don't mind this, except for the "spatial" folder, which contains distance, projection, containment, and bounding algorithms. Then there is the "spatial_window" folder, which is apparently different from "spatial", but only has one file. (I think this should be called "filtering").
The "utility" directory seems to conflate the concept of "utility" (helper code generally reusable across modules) and "detail" (implementation details not intended for reuse).
Let the bikeshedding begin!
The text was updated successfully, but these errors were encountered: