-
Notifications
You must be signed in to change notification settings - Fork 74
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
Find unused methods, bitrot #175
Comments
We should remove the files:
It contains a single function "match".
|
I think we should remove the method:
It's private by the underscore naming convention although technically protected.
|
I've noticed several methods by the name
|
I assume you are looking at BacktrackingTM? |
Oops I didn't look there... printState is in:
Of these 4 instances, SpatialPooler & TemporalMemory have the same very simple code, which I suggest moving to "utils/vector_helpers.hpp" BacktrackingTM and Cells4 have actually useful implementations which are specific to their class. I agree that we should keep these as they are. |
After PR #196 is merged there will not be any need for types/Types.h as a separate file. I would like to merge Types.h into Types.hpp. Types.h is still included in a few places but they are all C++ code and can use Types.hpp instead. |
We should delete file: |
|
|
|
@ctrl-z-9000-times The files DynamicLibrary.hpp&.cpp were utilities to allow runtime loading of shared libraries but as of this point this capability is not used. So, yes we can delete it. The bindings/module.cpp seemed to be an attempt to combine the three binding shared libraries but the .py code is expecting three libraries so we don't need this. Something else that can now be removed is NodeSet.hpp. It defines a structure declared in Region and RegionImpl but it is never used. We don't have nodes any more. The Region class is defined in Region.hpp and implemented in Region.cpp, Regionio.cpp, and RegionParameters.cpp. At one time there was a lot of code so that is why there are three .cpp files but now that a lot of code has been removed these three could be combined. |
We can replace the Timer class with calls to the
The clock() function returns the amount of CPU time that the calling process has consumed, which is probably what we want for measuring speed performance. Currently the timer measure the real system time. We really don't need a whole class to make two standard library calls. But since we have a Timer class: we also have documentation and unit-tests for it. We have unit-tests for a standard library function ... The method |
I agree with all of that. |
So I encountered a potential issue with removing Timer: it's used to profile the code. I'm going to go ahead and remove the profiling code where possible. The engine measures the run time for each region. This is part of the public API, methods:
I'd like to remove these. If that's unacceptable then I'd like to at least change the |
I think lapped CPU time is a better way to do profiling. |
There are some very good profiling programs which can do a better job at this than humans can, by automatically instrumenting the code instead of us manually instrumenting the code. In specific valgrind works well. |
I think we can remove the file "bindings/py/cpp_src/bindings/math/Matrix.hpp"
|
I think we can also remove the file "bindings/py/cpp_src/bindings/algorithms/py_Algorithms.cpp" which contains two functions:
|
good spot. This should definitely be removed, as is obsoleted.
sounds reasonable to me, as we prefer Connections to do the job. |
Consider removing file src/nupic/utils/stlio - Only included in SP/TM tests (so we could live w/o it) |
Crossref: SDR replaces VectorHelpers #320 |
We should remove |
By using IDE, or some tool - https://github.com/caolanm/callcatcher
..and remove them
The text was updated successfully, but these errors were encountered: