[opengm] 303/386: update struct. perceptron
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Wed Aug 31 08:38:16 UTC 2016
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch debian/master
in repository opengm.
commit 48d551baf17d281b4862e871af4fccfc6e30aedc
Author: DerThorsten <thorsten.beier at iwr.uni-heidelberg.de>
Date: Thu Dec 10 18:19:15 2015 -0300
update struct. perceptron
---
include/opengm/learning/structured_perceptron.hxx | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/include/opengm/learning/structured_perceptron.hxx b/include/opengm/learning/structured_perceptron.hxx
index 09b685f..b07cc91 100644
--- a/include/opengm/learning/structured_perceptron.hxx
+++ b/include/opengm/learning/structured_perceptron.hxx
@@ -151,11 +151,13 @@ namespace opengm {
featureAcc_.resetWeights();
+ #ifndef CI
omp_lock_t modelLockUnlock;
omp_init_lock(&modelLockUnlock);
omp_lock_t featureAccLock;
omp_init_lock(&featureAccLock);
+ #endif
#pragma omp parallel for
@@ -181,6 +183,7 @@ namespace opengm {
// acc features
+ #ifndef CI
omp_set_lock(&featureAccLock);
featureAcc_.accumulateFromOther(featureAcc);
omp_unset_lock(&featureAccLock);
@@ -189,6 +192,12 @@ namespace opengm {
omp_set_lock(&modelLockUnlock);
dataset_.unlockModel(gmi);
omp_unset_lock(&modelLockUnlock);
+ #else
+ featureAcc_.accumulateFromOther(featureAcc);
+ dataset_.unlockModel(gmi);
+ #endif
+
+
}
// update the weights
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opengm.git
More information about the debian-science-commits
mailing list