GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - mnnuahg/NestedLoopTest

BranchesTags
Open more actions menu

Latest commit

 

History

9 Commits
9 Commits

Folders and files

NameName
Last commit message
Last commit date
README.md
README.md
 
 
build.sh
build.sh
 
 
quicksortTest.cpp
quicksortTest.cpp
 
 
simpleTest.cpp
simpleTest.cpp
 
 
testLoop.h
testLoop.h
 
 

Repository files navigation

Outline

In programming models such as OpenMP or OpenACC, programmers can just implement a sequential program and annotate which loops can be executed in parallel. To test the correctness of the implementation, we may execute the loop iterations in random order since a parallel loop should not have dependencies among its iterations. This project contains two macros LOOP_BEGIN and LOOP_END, which can be used to enclose loops in C++ code, and the iterations of the enclosed loops will be executed in random order. The loops can also be nested. Nested loop iterations will be executed in random order while respecting the fork-join dependencies. The execution is still sequential, just the execution order is randomized.

Compiler requirement

This project makes use of C++ lambda function, which is supported by g++ 4.5 or higher.

Files

testLoop.h

The main file of this project. The C++ source file should include testLoop.h to use the two macros LOOP_BEGIN and LOOP_END. Note testLoop.h also contains implementations of some class member functions, so there will be problems if two c++ source files including testLoop.h are linked together.

simpleTest.cpp

A simple demo to show how to use the two macros LOOP_BEGIN and LOOP_END. The execution result also shows how the fork-join dependencies are respected.

quicksortTest.cpp

A QuickSort demo. After partitioning, the two sub-arrays are processed in random order. This demo also shows the capability of this project to handle loops in (recursive) function calls.

build.sh

Build script of simpleTest.cpp and quicksortTest.cpp

About

No description or website provided.

Topics

fork-joinnested-loopopenmp

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.