This file contains 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
/** | |
* TODO: * Threads could block each other: When a job thread starts another job-thread, | |
* the child one wont be executed, if the max number of threads is already reached. | |
* The child will wait for ever in the queue, the parent will wait for the child. | |
* Right now the constructor parameter <inception> needs to be set to true, if | |
* the LoadBalancer is created within an already running job. If so, the maximum | |
* number of threads is altered by one (since the parent one should just be waiting | |
* for the jobs). There sure are better ways to solve this ... | |
* * double list of running jobs, one static to check if this_thread is in there? | |
* * doing everythin global (static or singleton) and remove the parent one from |
This file contains 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
#include "LoadBalancer.hpp" | |
int LoadBalancer::running_thread_count = 0; | |
int LoadBalancer::max_threads = 5; | |
mutex LoadBalancer::global_mutex; | |
LoadBalancer::LoadBalancer(bool inception): | |
inception(inception), |
This file contains 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
import gtsam | |
import gtsam_unstable | |
def point_covaraince_test(): | |
# graph with point-features | |
# --------------------------- | |
p_obs = gtsam.Point2(1, 2) | |
cov = np.array(((2., -1.), (-1., 3.))) |