Skip to content

Commit

Permalink
Add the execution results from the omp example
Browse files Browse the repository at this point in the history
  • Loading branch information
vgvassilev committed Sep 24, 2023
1 parent 4a932ae commit c2544b5
Showing 1 changed file with 27 additions and 10 deletions.
37 changes: 27 additions & 10 deletions notebooks/omp/hello_world.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
"cells": [
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"id": "73cbab37-71dd-477d-981b-f2ec28c01bd6",
"metadata": {},
"outputs": [],
"source": [
"#include <stdio.h>\n",
"#include <omp.h>\n",
"#include </home/jovyan/CppInterOp/include/clang/Interpreter/CppInterOp.h>"
"#include <clang/Interpreter/CppInterOp.h>"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"id": "ef1cd58a-672c-4a6f-843a-6c88fc4911f3",
"metadata": {},
"outputs": [],
Expand All @@ -25,7 +25,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"id": "c2b754ad-9553-4a42-b990-f990a9a269ed",
"metadata": {},
"outputs": [],
Expand All @@ -48,10 +48,27 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"id": "a37a13d4-fc82-496e-8f42-9e718a8c2aa0",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"max threads: 8\n",
"Hello World from thread = 2 with 8 threads\n",
"Hello World from thread = 0 with 8 threads\n",
"Hello World from thread = 1 with 8 threads\n",
"Hello World from thread = 7 with 8 threads\n",
"Hello World from thread = 4 with 8 threads\n",
"Hello World from thread = 5 with 8 threads\n",
"Hello World from thread = 3 with 8 threads\n",
"Hello World from thread = 6 with 8 threads\n",
"all done, with hopefully 8 threads\n"
]
}
],
"source": [
"main();"
]
Expand All @@ -67,16 +84,16 @@
],
"metadata": {
"kernelspec": {
"display_name": "C++14",
"language": "C++14",
"name": "xcpp14"
"display_name": "C++17 (+OpenMP)",
"language": "C++17",
"name": "omp-xcpp17"
},
"language_info": {
"codemirror_mode": "text/x-c++src",
"file_extension": ".cpp",
"mimetype": "text/x-c++src",
"name": "c++",
"version": "14"
"version": "17"
}
},
"nbformat": 4,
Expand Down

0 comments on commit c2544b5

Please sign in to comment.