Skip to content

Commit

Permalink
Removed incorrect placement of OpenMP pragma on for-loops.
Browse files Browse the repository at this point in the history
  • Loading branch information
nthnn committed Oct 31, 2024
1 parent cd5b94a commit 225dbf4
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
2 changes: 0 additions & 2 deletions src/zhivo/ast/expression/VariableDeclarationExpression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

DynamicObject VariableDeclarationExpression::visit(SymbolTable& symbols) {
if(!this->nativePath.empty()) {
#pragma omp parallel for
for(const auto& [key, value] : this->declarations) {
std::string name = key.getImage();
DynamicObject func = DynamicObject(
Expand All @@ -48,7 +47,6 @@ DynamicObject VariableDeclarationExpression::visit(SymbolTable& symbols) {
return {};
}

#pragma omp parallel for
for(const auto& [key, value] : this->declarations)
symbols.setSymbol(
key.getImage(),
Expand Down
3 changes: 1 addition & 2 deletions src/zhivo/core/DynamicObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ bool DynamicObject::operator==(const DynamicObject& other) {

auto left = this->getArray(),
right = other.getArray();

#pragma omp parallel for

for(size_t i = 0; i < len; i++)
if(!(left->at(i) == right->at(i)))
return false;
Expand Down
1 change: 0 additions & 1 deletion src/zhivo/core/Runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ bool Runtime::hasLoadedLibrary(std::string libName) {
}

void Runtime::cleanUp() {
#pragma omp parallel for
for(const auto& [key, value] : Runtime::nativeLibraries)
if(value != nullptr)
#if defined(__unix__) || defined(__linux__) || defined(__APPLE__)
Expand Down

0 comments on commit 225dbf4

Please sign in to comment.