[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Getfem-commits] r5234 - /trunk/getfem/src/getfem_generic_assembly.cc
From: |
andriy . andreykiv |
Subject: |
[Getfem-commits] r5234 - /trunk/getfem/src/getfem_generic_assembly.cc |
Date: |
Mon, 01 Feb 2016 15:27:26 -0000 |
Author: andrico
Date: Mon Feb 1 16:27:25 2016
New Revision: 5234
URL: http://svn.gna.org/viewcvs/getfem?rev=5234&view=rev
Log:
function storage and extraction should be on one thread only, as
ga_predef_function_tab doesn't initialize itself on every thread
Modified:
trunk/getfem/src/getfem_generic_assembly.cc
Modified: trunk/getfem/src/getfem_generic_assembly.cc
URL:
http://svn.gna.org/viewcvs/getfem/trunk/getfem/src/getfem_generic_assembly.cc?rev=5234&r1=5233&r2=5234&view=diff
==============================================================================
--- trunk/getfem/src/getfem_generic_assembly.cc (original)
+++ trunk/getfem/src/getfem_generic_assembly.cc Mon Feb 1 16:27:25 2016
@@ -2405,7 +2405,7 @@
// Predefined functions
ga_predef_function_tab &PREDEF_FUNCTIONS
- = dal::singleton<ga_predef_function_tab>::instance();
+ = dal::singleton<ga_predef_function_tab>::instance(0);
// Power functions and their derivatives
PREDEF_FUNCTIONS["sqrt"] = ga_predef_function(sqrt, 1, "DER_PDFUNC_SQRT");
@@ -2548,7 +2548,7 @@
bool ga_function_exists(const std::string name) {
const ga_predef_function_tab &PREDEF_FUNCTIONS
- = dal::singleton<ga_predef_function_tab>::instance();
+ = dal::singleton<ga_predef_function_tab>::instance(0);
return PREDEF_FUNCTIONS.find(name) != PREDEF_FUNCTIONS.end();
}
@@ -2568,7 +2568,7 @@
}
ga_predef_function_tab &PREDEF_FUNCTIONS
- = dal::singleton<ga_predef_function_tab>::instance();
+ = dal::singleton<ga_predef_function_tab>::instance(0);
GMM_ASSERT1(PREDEF_FUNCTIONS.find(name) == PREDEF_FUNCTIONS.end(),
"Already defined function " << name);
PREDEF_FUNCTIONS[name] = ga_predef_function(expr);
@@ -2597,7 +2597,7 @@
void ga_define_function(const std::string name, pscalar_func_onearg f,
const std::string &der) {
ga_predef_function_tab &PREDEF_FUNCTIONS
- = dal::singleton<ga_predef_function_tab>::instance();
+ = dal::singleton<ga_predef_function_tab>::instance(0);
PREDEF_FUNCTIONS[name] = ga_predef_function(f, 1, der);
ga_predef_function &F = PREDEF_FUNCTIONS[name];
if (der.size() == 0) F.dtype_ = 0;
@@ -2607,7 +2607,7 @@
void ga_define_function(const std::string name, pscalar_func_twoargs f,
const std::string &der1, const std::string &der2) {
ga_predef_function_tab &PREDEF_FUNCTIONS
- = dal::singleton<ga_predef_function_tab>::instance();
+ = dal::singleton<ga_predef_function_tab>::instance(0);
PREDEF_FUNCTIONS[name] = ga_predef_function(f, 1, der1, der2);
ga_predef_function &F = PREDEF_FUNCTIONS[name];
if (der1.size() == 0 || der2.size() == 0)
@@ -2618,7 +2618,7 @@
void ga_undefine_function(const std::string name) {
ga_predef_function_tab &PREDEF_FUNCTIONS
- = dal::singleton<ga_predef_function_tab>::instance();
+ = dal::singleton<ga_predef_function_tab>::instance(0);
ga_predef_function_tab::iterator it = PREDEF_FUNCTIONS.find(name);
if (it != PREDEF_FUNCTIONS.end()) {
PREDEF_FUNCTIONS.erase(name);
@@ -6026,7 +6026,7 @@
return 2;
ga_predef_function_tab &PREDEF_FUNCTIONS
- = dal::singleton<ga_predef_function_tab>::instance();
+ = dal::singleton<ga_predef_function_tab>::instance(0);
ga_predef_operator_tab &PREDEF_OPERATORS
= dal::singleton<ga_predef_operator_tab>::instance(0);
ga_predef_function_tab::const_iterator it=PREDEF_FUNCTIONS.find(name);
@@ -6149,7 +6149,7 @@
// cout<<"begin analysis of node "; ga_print_node(pnode, cout); cout<<endl;
const ga_predef_function_tab &PREDEF_FUNCTIONS
- = dal::singleton<ga_predef_function_tab>::instance();
+ = dal::singleton<ga_predef_function_tab>::instance(0);
const ga_predef_operator_tab &PREDEF_OPERATORS
= dal::singleton<ga_predef_operator_tab>::instance(0);
@@ -8449,7 +8449,7 @@
bgeot::multi_index mi;
const ga_predef_function_tab &PREDEF_FUNCTIONS
- = dal::singleton<ga_predef_function_tab>::instance();
+ = dal::singleton<ga_predef_function_tab>::instance(0);
switch (pnode->node_type) {
case GA_NODE_VAL: case GA_NODE_GRAD:
@@ -10374,7 +10374,7 @@
std::string name = child0->name;
const ga_predef_function_tab &PREDEF_FUNCTIONS
- = dal::singleton<ga_predef_function_tab>::instance();
+ = dal::singleton<ga_predef_function_tab>::instance(0);
ga_predef_function_tab::const_iterator it =
PREDEF_FUNCTIONS.find(name);
const ga_predef_function &F = it->second;
size_type nbargs = F.nbargs();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Getfem-commits] r5234 - /trunk/getfem/src/getfem_generic_assembly.cc,
andriy . andreykiv <=