24
edits
Changes
no edit summary
== Testing ==
=== OpenMP ===
// OpenMP- Runtime Routines // omp_hi.cpp #include <iostream> #include <omp.h> int main() { #pragma omp parallel { int tid = omp_get_thread_num(); std::cout << "Hi from thread " << tid << '\n'; } }
=== TBB ===
// TBB- Hello World // tbb.cpp #include <iostream> #include <tbb/tbb.h> int main() { std::cout << "Hello World from TBB " << TBB_VERSION_MAJOR << "." << TBB_VERSION_MINOR << " (" << TBB_INTERFACE_VERSION << ")" << std::endl; }
=== MPI ===
// MPIProgram - Hello World // mpi_hello.c #include <stdio.h> #include <mpi.h> int main(int argc, char** argv) { int rank, np; MPI_Init(&argc, &argv); MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &np); printf("Hello from process %d of %d\n", rank, np); MPI_Finalize(); return 0; }