-
- Downloads
Move to a weak reference design pattern for Transform objects used in...
Move to a weak reference design pattern for Transform objects used in wrappers. Fix memory leaks for Transform. Did it directly in C++ with std::shared_ptr into the new TransformHelper class. The shared_ptr is the placeholder for Transform object address. That object is shared by several Py or Matlab Faust objects in a memory opt. goal (typically for one Faust and its transpose). The TransformHelper class hosts the Transform object shared_ptr to which it relies to implement all the functions needed by wrappers. The new pattern unifies Py. and Matlab wrappers a little bit more and opens the possibility of a new language wrapper with less complications. By the way, Got rid of transpose_flag in wrappers (moved to C++ side), avoiding to modify the result of Faust::Transform functions from the wrapper code after flag consult, rather doing it on C++ side (for example for get_factor() when the Faust is a transpose we needed to transpose the factor into the wrapper. That's no longer needed.). Besides, this commit avoids to do a copy in FaustPy.Faust.transpose() because the C++ function TransformHelper::transpose() returns a new TransformHelper object flagged as a transpose (referencing the same underlying Transform object though). This commit is also a FIX to matlab Faust.delete(): the bug were that when deleting a Faust transpose we lost also the original Faust... It likely applies also to py. wrapper (the underlying C++ object could not be deleted). Memory Leak fixed. Other minor changes: - Deletion of shape attribute into py wrapper (directly rely on underlying C++ object function size()). - Modification of Faust() constructor to force explicit filepath keyword argument passing if wanting to build Faust from file. - ...
Showing
- misc/test/src/Python/test_FaustPy.py 7 additions, 4 deletionsmisc/test/src/Python/test_FaustPy.py
- misc/test/src/Python/test_pyFaust.py 8 additions, 8 deletionsmisc/test/src/Python/test_pyFaust.py
- src/faust_linear_operator/CPU/faust_Transform.h 5 additions, 2 deletionssrc/faust_linear_operator/CPU/faust_Transform.h
- src/faust_linear_operator/CPU/faust_TransformHelper.h 54 additions, 0 deletionssrc/faust_linear_operator/CPU/faust_TransformHelper.h
- src/faust_linear_operator/CPU/faust_TransformHelper.hpp 177 additions, 0 deletionssrc/faust_linear_operator/CPU/faust_TransformHelper.hpp
- wrapper/matlab/Faust.m 90 additions, 94 deletionswrapper/matlab/Faust.m
- wrapper/matlab/src/mexFaust.cpp.in 279 additions, 310 deletionswrapper/matlab/src/mexFaust.cpp.in
- wrapper/matlab/tools/FaustCore.m 34 additions, 25 deletionswrapper/matlab/tools/FaustCore.m
- wrapper/python/FaustPy.py 21 additions, 22 deletionswrapper/python/FaustPy.py
- wrapper/python/quickstart.py 2 additions, 2 deletionswrapper/python/quickstart.py
- wrapper/python/setup.py.in 1 addition, 0 deletionswrapper/python/setup.py.in
- wrapper/python/src/FaustCoreCpp.h 15 additions, 14 deletionswrapper/python/src/FaustCoreCpp.h
- wrapper/python/src/FaustCoreCpp.hpp 93 additions, 96 deletionswrapper/python/src/FaustCoreCpp.hpp
- wrapper/python/src/FaustCoreCy.pxd 5 additions, 3 deletionswrapper/python/src/FaustCoreCy.pxd
- wrapper/python/src/FaustCorePy.pyx 41 additions, 28 deletionswrapper/python/src/FaustCorePy.pyx
Loading
Please register or sign in to comment