chore: init
This commit is contained in:
79
Student_OMP/.project
Executable file
79
Student_OMP/.project
Executable file
@@ -0,0 +1,79 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>Tuto_Graphe_GL</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
<dictionary>
|
||||
<key>?name?</key>
|
||||
<value></value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.append_environment</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
|
||||
<value>all</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildArguments</key>
|
||||
<value>-f mingw.mk</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildCommand</key>
|
||||
<value>make</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
|
||||
<value>clean</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.contents</key>
|
||||
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
|
||||
<value>false</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
|
||||
<value>all</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.stopOnError</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
|
||||
<value>false</value>
|
||||
</dictionary>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.core.ccnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
1
Student_OMP/INC_SYMLINK/EXT/Aleas.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/Aleas.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/header/Aleas.h
|
1
Student_OMP/INC_SYMLINK/EXT/Animator_CPU.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/Animator_CPU.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/02_fps/01_namespace_cpu/Animator_CPU.h
|
1
Student_OMP/INC_SYMLINK/EXT/Args.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/Args.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/06_context/Args.h
|
1
Student_OMP/INC_SYMLINK/EXT/Array.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/Array.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/03_array/Array.h
|
1
Student_OMP/INC_SYMLINK/EXT/Array_Imp.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/Array_Imp.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/03_array/Array_Imp.h
|
1
Student_OMP/INC_SYMLINK/EXT/Bandwidth.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/Bandwidth.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/02_fps/Bandwidth.h
|
1
Student_OMP/INC_SYMLINK/EXT/Calibreur_CPU.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/Calibreur_CPU.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/02_fps/01_namespace_cpu/Calibreur_CPU.h
|
1
Student_OMP/INC_SYMLINK/EXT/Chrome.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/Chrome.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/header/Chrome.h
|
1
Student_OMP/INC_SYMLINK/EXT/Chrono.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/Chrono.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/05_chrono/Chrono.h
|
1
Student_OMP/INC_SYMLINK/EXT/ChronoClock.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/ChronoClock.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/05_chrono/clock/ChronoClock.h
|
1
Student_OMP/INC_SYMLINK/EXT/ChronoFactory.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/ChronoFactory.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/05_chrono/ChronoFactory.h
|
1
Student_OMP/INC_SYMLINK/EXT/ChronoOMP.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/ChronoOMP.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/05_chrono/omp/ChronoOMP.h
|
1
Student_OMP/INC_SYMLINK/EXT/ChronoSTD.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/ChronoSTD.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/05_chrono/std/ChronoSTD.h
|
1
Student_OMP/INC_SYMLINK/EXT/ChronoType.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/ChronoType.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/05_chrono/ChronoType.h
|
1
Student_OMP/INC_SYMLINK/EXT/ColorRGB_01.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/ColorRGB_01.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/header/ColorRGB_01.h
|
1
Student_OMP/INC_SYMLINK/EXT/Colors_CPU.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/Colors_CPU.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/02_fps/01_namespace_cpu/Colors_CPU.h
|
1
Student_OMP/INC_SYMLINK/EXT/Couts.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/Couts.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/header/Couts.h
|
1
Student_OMP/INC_SYMLINK/EXT/CppTest.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/CppTest.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/ext/cpptest/200/INC/extension/CppTest.h
|
1
Student_OMP/INC_SYMLINK/EXT/EtatChrono.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/EtatChrono.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/05_chrono/EtatChrono.h
|
1
Student_OMP/INC_SYMLINK/EXT/Folders.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/Folders.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/04_files/Folders.h
|
1
Student_OMP/INC_SYMLINK/EXT/Fps.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/Fps.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/02_fps/Fps.h
|
1
Student_OMP/INC_SYMLINK/EXT/FpsCalculator.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/FpsCalculator.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/02_fps/FpsCalculator.h
|
1
Student_OMP/INC_SYMLINK/EXT/Indices_CPU.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/Indices_CPU.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/02_fps/01_namespace_cpu/Indices_CPU.h
|
1
Student_OMP/INC_SYMLINK/EXT/Interval_CPU.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/Interval_CPU.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/02_fps/01_namespace_cpu/Interval_CPU.h
|
1
Student_OMP/INC_SYMLINK/EXT/Iterator.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/Iterator.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/header/Iterator.h
|
1
Student_OMP/INC_SYMLINK/EXT/Limits.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/Limits.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/header/Limits.h
|
1
Student_OMP/INC_SYMLINK/EXT/Maths.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/Maths.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/header/Maths.h
|
1
Student_OMP/INC_SYMLINK/EXT/Omps.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/Omps.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_omp/305_016/INC/OMP_Tools/Omps.h
|
1
Student_OMP/INC_SYMLINK/EXT/ParallelPatern.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/ParallelPatern.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_omp/305_016/INC/OMP_Tools/ParallelPatern.h
|
1
Student_OMP/INC_SYMLINK/EXT/Progress.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/Progress.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/header/Progress.h
|
1
Student_OMP/INC_SYMLINK/EXT/ResultWritter.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/ResultWritter.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/04_files/ResultWritter.h
|
1
Student_OMP/INC_SYMLINK/EXT/Runnable_I.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/Runnable_I.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/02_fps/Runnable_I.h
|
1
Student_OMP/INC_SYMLINK/EXT/Strings.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/Strings.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/header/Strings.h
|
1
Student_OMP/INC_SYMLINK/EXT/Tab.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/Tab.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/03_array/Tab.h
|
1
Student_OMP/INC_SYMLINK/EXT/TabTools.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/TabTools.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/03_array/TabTools.h
|
1
Student_OMP/INC_SYMLINK/EXT/Tab_Imp.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/Tab_Imp.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/03_array/Tab_Imp.h
|
1
Student_OMP/INC_SYMLINK/EXT/Variateur_CPU.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/Variateur_CPU.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/02_fps/01_namespace_cpu/Variateur_CPU.h
|
1
Student_OMP/INC_SYMLINK/EXT/VideoShop.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/VideoShop.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/header/VideoShop.h
|
1
Student_OMP/INC_SYMLINK/EXT/config.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/config.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/ext/cpptest/200/INC/config.h
|
1
Student_OMP/INC_SYMLINK/EXT/cpptest (Case Conflict).h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/cpptest (Case Conflict).h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/ext/cpptest/200/INC/cpptest.h
|
1
Student_OMP/INC_SYMLINK/EXT/cpptest-assert.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/cpptest-assert.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/ext/cpptest/200/INC/cpptest-assert.h
|
1
Student_OMP/INC_SYMLINK/EXT/cpptest-collectoroutput.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/cpptest-collectoroutput.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/ext/cpptest/200/INC/cpptest-collectoroutput.h
|
1
Student_OMP/INC_SYMLINK/EXT/cpptest-compileroutput.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/cpptest-compileroutput.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/ext/cpptest/200/INC/cpptest-compileroutput.h
|
1
Student_OMP/INC_SYMLINK/EXT/cpptest-htmloutput.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/cpptest-htmloutput.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/ext/cpptest/200/INC/cpptest-htmloutput.h
|
1
Student_OMP/INC_SYMLINK/EXT/cpptest-output.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/cpptest-output.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/ext/cpptest/200/INC/cpptest-output.h
|
1
Student_OMP/INC_SYMLINK/EXT/cpptest-source.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/cpptest-source.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/ext/cpptest/200/INC/cpptest-source.h
|
1
Student_OMP/INC_SYMLINK/EXT/cpptest-suite.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/cpptest-suite.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/ext/cpptest/200/INC/cpptest-suite.h
|
1
Student_OMP/INC_SYMLINK/EXT/cpptest-textoutput.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/cpptest-textoutput.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/ext/cpptest/200/INC/cpptest-textoutput.h
|
1
Student_OMP/INC_SYMLINK/EXT/cpptest-time.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/cpptest-time.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/ext/cpptest/200/INC/cpptest-time.h
|
1
Student_OMP/INC_SYMLINK/EXT/cudaType_CPU.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/cudaType_CPU.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/cbi/tools/bilat_tools_cpp/305_016/INC/tools/02_fps/01_namespace_cpu/cudaType_CPU.h
|
1
Student_OMP/INC_SYMLINK/EXT/missing.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/missing.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/ext/cpptest/200/INC/missing.h
|
1
Student_OMP/INC_SYMLINK/EXT/outputType.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/outputType.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/ext/cpptest/200/INC/extension/outputType.h
|
1
Student_OMP/INC_SYMLINK/EXT/utils.h
Symbolic link
1
Student_OMP/INC_SYMLINK/EXT/utils.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/api/ext/cpptest/200/INC/utils.h
|
1
Student_OMP/INC_SYMLINK/PROJECT/99_pi_tools.h
Symbolic link
1
Student_OMP/INC_SYMLINK/PROJECT/99_pi_tools.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/home/mse15/CUDA/toStudent/code/WCudaStudent/Student_OMP/src/core/omp/02_Slice/99_pi_tools.h
|
1
Student_OMP/INC_SYMLINK/PROJECT/TestHello.h
Symbolic link
1
Student_OMP/INC_SYMLINK/PROJECT/TestHello.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/home/mse15/CUDA/toStudent/code/WCudaStudent/Student_OMP/src/test/unit/01_Test_Hello/TestHello.h
|
1
Student_OMP/INC_SYMLINK/PROJECT/TestPi.h
Symbolic link
1
Student_OMP/INC_SYMLINK/PROJECT/TestPi.h
Symbolic link
@@ -0,0 +1 @@
|
||||
/home/mse15/CUDA/toStudent/code/WCudaStudent/Student_OMP/src/test/unit/02_Test_Pi/TestPi.h
|
75
Student_OMP/dataProject.mk
Executable file
75
Student_OMP/dataProject.mk
Executable file
@@ -0,0 +1,75 @@
|
||||
# Version 0.0.2
|
||||
# Cedric.Bilat@he-arc.ch
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
# (N1) This configuration file is compiler-free.
|
||||
#
|
||||
# (N2) Go in xxx.mk if you whish customize a specific compiler (where xxx= gcc, xxx = visual, ...).
|
||||
#
|
||||
# Conseils:
|
||||
#
|
||||
# (C1) In the below definition of variables, never let a space at the end!!!
|
||||
#
|
||||
# (C2) When you overrid a varaible "XXX+= YYY" be careful to let a space after the symbol "="
|
||||
#
|
||||
|
||||
#################################################
|
||||
# Project Configurator #
|
||||
#################################################
|
||||
|
||||
##############################
|
||||
# Basic #
|
||||
##############################
|
||||
|
||||
#Name target (without extension)
|
||||
|
||||
TARGET_NAME:=Student_OMP_${USER}
|
||||
|
||||
#Target type:
|
||||
# EXE
|
||||
# SHARED_LIB
|
||||
# STATIC_LIB
|
||||
|
||||
TARGET_MODE:=EXE
|
||||
|
||||
#################
|
||||
# src aux #
|
||||
#################
|
||||
|
||||
# Expand the src folder.
|
||||
# Tip : All files (.cpp, .h .lib, ...) will be considered recursively !
|
||||
# Mimimum : empty
|
||||
|
||||
override SRC_AUX+=#
|
||||
|
||||
#################
|
||||
# API Ext #
|
||||
#################
|
||||
|
||||
# Define preconfigured extern API
|
||||
# Tip : See ../PRODUCTION/....../api for available preconfigured api (Boost, openCV, cppTest, ...)
|
||||
# Note : apiXXX.mk define
|
||||
# .h for compil-time
|
||||
# .so .lib for link-time
|
||||
# but nothing usefull for runtime
|
||||
# Usage : -include $(API)/XXX.mk
|
||||
# Mimimum : empty
|
||||
|
||||
include $(API_CBI_TOOLS)/bilat_tools_cpp.mk
|
||||
include $(API_CBI_TOOLS)/bilat_tools_omp.mk
|
||||
|
||||
include $(API_EXT)/cppTest.mk
|
||||
|
||||
#############################
|
||||
# Advanced #
|
||||
#############################
|
||||
|
||||
# Define compilation variable
|
||||
# Note : Same as -DXXX (on command line) or #define XXX (in .ccp code)
|
||||
# Mimimum : empty
|
||||
override CODE_DEFINE_VARIABLES+=#
|
||||
|
||||
#################################################
|
||||
# End #
|
||||
#################################################
|
51
Student_OMP/src/core/mainCore.cpp
Executable file
51
Student_OMP/src/core/mainCore.cpp
Executable file
@@ -0,0 +1,51 @@
|
||||
#include <stdlib.h>
|
||||
#include <iostream>
|
||||
#include "ChronoFactory.h"
|
||||
|
||||
using std::cerr;
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Imported *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
extern bool usePI();
|
||||
extern bool useHello();
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* Implementation *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
int mainCore()
|
||||
{
|
||||
Chrono* ptrChrono = ChronoFactory::create();
|
||||
|
||||
bool isOk = true;
|
||||
isOk &= useHello();
|
||||
isOk &= usePI();
|
||||
|
||||
ptrChrono->stop();
|
||||
|
||||
cout << endl << endl;
|
||||
cout << "mainCore :" << *ptrChrono << endl;
|
||||
cout << "mainCore : ";
|
||||
if (isOk)
|
||||
{
|
||||
cout << "SUCCESS, Congratulation!";
|
||||
}
|
||||
else
|
||||
{
|
||||
cerr << "FAILED, sorry!";
|
||||
}
|
||||
cout << endl << endl;
|
||||
|
||||
delete ptrChrono;
|
||||
|
||||
return isOk ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* End *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
51
Student_OMP/src/core/omp/01_Hello/helloOMP.cpp
Executable file
51
Student_OMP/src/core/omp/01_Hello/helloOMP.cpp
Executable file
@@ -0,0 +1,51 @@
|
||||
#include <iostream>
|
||||
#include <stdio.h>
|
||||
#include "omp.h"
|
||||
#include "Omps.h"
|
||||
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* Implementation *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
|
||||
void helloOMP1()
|
||||
{
|
||||
cout << endl << "[HelloOMP 1]" << endl;
|
||||
|
||||
// OMP (facultatif)
|
||||
const int NB_THREAD = Omps::setAndGetNaturalGranularity();
|
||||
cout << "\n[HELLO] nbThread = " << NB_THREAD << endl;
|
||||
|
||||
#pragma omp parallel
|
||||
{
|
||||
int tid = Omps::getTid();
|
||||
|
||||
//cout << "tid=" << tid << endl; // ligne couper
|
||||
printf("tid=%i\n", tid); //ligne non couper
|
||||
}
|
||||
}
|
||||
|
||||
void helloOMP2()
|
||||
{
|
||||
cout << endl << "[HelloOMP 2]" << endl;
|
||||
|
||||
// OMP (facultatif)
|
||||
const int NB_THREAD = Omps::setAndGetNaturalGranularity();
|
||||
cout << "\n[CBI] nbThread = " << NB_THREAD << endl;
|
||||
|
||||
int n = 20;
|
||||
#pragma omp parallel for
|
||||
for (int i = 1; i <= n; i++)
|
||||
{
|
||||
//cout << "HelloOMP(" << i << ")" << endl; // ligne couper
|
||||
printf("HelloOMP(%i)\n", i); // ligne non couper
|
||||
}
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* End *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
30
Student_OMP/src/core/omp/01_Hello/useHello.cpp
Executable file
30
Student_OMP/src/core/omp/01_Hello/useHello.cpp
Executable file
@@ -0,0 +1,30 @@
|
||||
#include <iostream>
|
||||
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Imported *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
extern void helloOMP1();
|
||||
extern void helloOMP2();
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* Implementation *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
bool useHello()
|
||||
{
|
||||
cout << endl << "[HelloOMP]" << endl;
|
||||
|
||||
helloOMP1();
|
||||
helloOMP2();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* End *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
49
Student_OMP/src/core/omp/02_Slice/01_pi_sequentiel.cpp
Executable file
49
Student_OMP/src/core/omp/02_Slice/01_pi_sequentiel.cpp
Executable file
@@ -0,0 +1,49 @@
|
||||
#include "99_pi_tools.h"
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* Declaration *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Public *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
bool isPiSequentiel_OK(int n);
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Private *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
static double piSequentiel(int n);
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* Implementation *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Public *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
bool isPiSequentiel_OK(int n)
|
||||
{
|
||||
return isAlgoPI_OK(piSequentiel, n, "Pi Sequentiel");
|
||||
}
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Private *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
double piSequentiel(int n) {
|
||||
const double delta_x = 1 / (double)n;
|
||||
double sum = 0;
|
||||
for (int i = 0; i < n; i++) {
|
||||
double xi = i * delta_x;
|
||||
sum += fpi(xi);
|
||||
}
|
||||
|
||||
return sum * delta_x;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* End *|
|
||||
\*---------------------------------------------------------------------*/
|
77
Student_OMP/src/core/omp/02_Slice/02_pi_entrelacer_promotionTab.cpp
Executable file
77
Student_OMP/src/core/omp/02_Slice/02_pi_entrelacer_promotionTab.cpp
Executable file
@@ -0,0 +1,77 @@
|
||||
#include <omp.h>
|
||||
#include "Omps.h"
|
||||
#include "99_pi_tools.h"
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* Declaration *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Public *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
bool isPiOMPEntrelacerPromotionTab_Ok(int n);
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Private *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
static double piOMPEntrelacerPromotionTab(int n);
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* Implementation *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Public *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
bool isPiOMPEntrelacerPromotionTab_Ok(int n)
|
||||
{
|
||||
return isAlgoPI_OK(piOMPEntrelacerPromotionTab, n, "Pi OMP Entrelacer promotionTab");
|
||||
}
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Private *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
/**
|
||||
* pattern cuda : excellent!
|
||||
*/
|
||||
double piOMPEntrelacerPromotionTab(int n)
|
||||
{
|
||||
const double delta_x = 1.0 / (double)n;
|
||||
const int NB_THREAD = Omps::setAndGetNaturalGranularity();
|
||||
double sum[NB_THREAD];
|
||||
|
||||
// Reduction intra thread
|
||||
#pragma omp parallel
|
||||
{
|
||||
|
||||
const int TID = Omps::getTid();
|
||||
int s = TID;
|
||||
|
||||
double sum_thread = 0;
|
||||
|
||||
while (s < n)
|
||||
{
|
||||
double xi = s * delta_x;
|
||||
sum_thread += fpi(xi);
|
||||
s += NB_THREAD;
|
||||
}
|
||||
sum[TID] = sum_thread;
|
||||
}
|
||||
|
||||
double sumTotal = 0;
|
||||
|
||||
for (int i = 0; i < NB_THREAD; i++)
|
||||
{
|
||||
sumTotal += sum[i];
|
||||
}
|
||||
|
||||
return sumTotal * delta_x;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* End *|
|
||||
\*---------------------------------------------------------------------*/
|
47
Student_OMP/src/core/omp/02_Slice/03_pi_entrelacer_critique.cpp
Executable file
47
Student_OMP/src/core/omp/02_Slice/03_pi_entrelacer_critique.cpp
Executable file
@@ -0,0 +1,47 @@
|
||||
#include <omp.h>
|
||||
#include "Omps.h"
|
||||
#include "99_pi_tools.h"
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* Declaration *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Public *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
bool isPiOMPEntrelacerCritical_Ok(int n);
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Private *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
static double piOMPEntrelacerCritical(int n);
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* Implementation *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Public *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
bool isPiOMPEntrelacerCritical_Ok(int n)
|
||||
{
|
||||
return isAlgoPI_OK(piOMPEntrelacerCritical, n, "Pi OMP Entrelacer critical");
|
||||
}
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Private *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
double piOMPEntrelacerCritical(int n)
|
||||
{
|
||||
//TODO
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* End *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
50
Student_OMP/src/core/omp/02_Slice/04_pi_entrelacer_atomic.cpp
Executable file
50
Student_OMP/src/core/omp/02_Slice/04_pi_entrelacer_atomic.cpp
Executable file
@@ -0,0 +1,50 @@
|
||||
#include <omp.h>
|
||||
#include "Omps.h"
|
||||
#include "99_pi_tools.h"
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* Declaration *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Public *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
bool isPiOMPEntrelacerAtomic_Ok(int n);
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Private *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
static double piOMPEntrelacerAtomic(int n);
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* Implementation *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Public *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
bool isPiOMPEntrelacerAtomic_Ok(int n)
|
||||
{
|
||||
return isAlgoPI_OK(piOMPEntrelacerAtomic, n, "Pi OMP Entrelacer atomic");
|
||||
}
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Private *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
/**
|
||||
* Bonne performance, si!
|
||||
*/
|
||||
double piOMPEntrelacerAtomic(int n)
|
||||
{
|
||||
// TODO
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* End *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
50
Student_OMP/src/core/omp/02_Slice/05_pi_for_critical.cpp
Executable file
50
Student_OMP/src/core/omp/02_Slice/05_pi_for_critical.cpp
Executable file
@@ -0,0 +1,50 @@
|
||||
#include <omp.h>
|
||||
#include "Omps.h"
|
||||
#include "99_pi_tools.h"
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* Declaration *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Public *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
bool isPiOMPforCritical_Ok(int n);
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Private *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
static double piOMPforCritique(int n);
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* Implementation *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Public *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
bool isPiOMPforCritical_Ok(int n)
|
||||
{
|
||||
return isAlgoPI_OK(piOMPforCritique, n, "Pi OMP for critique");
|
||||
}
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Private *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
/**
|
||||
* synchronisation couteuse!
|
||||
*/
|
||||
double piOMPforCritique(int n)
|
||||
{
|
||||
//TODO
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* End *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
50
Student_OMP/src/core/omp/02_Slice/06_pi_for_atomic.cpp
Executable file
50
Student_OMP/src/core/omp/02_Slice/06_pi_for_atomic.cpp
Executable file
@@ -0,0 +1,50 @@
|
||||
#include <omp.h>
|
||||
#include "Omps.h"
|
||||
#include "99_pi_tools.h"
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* Declaration *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Public *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
bool isPiOMPforAtomic_Ok(int n);
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Private *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
static double piOMPforAtomic(int n);
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* Implementation *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Public *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
bool isPiOMPforAtomic_Ok(int n)
|
||||
{
|
||||
return isAlgoPI_OK(piOMPforAtomic, n, "Pi OMP for atomic");
|
||||
}
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Private *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
/**
|
||||
* synchronisation couteuse!
|
||||
*/
|
||||
double piOMPforAtomic(int n)
|
||||
{
|
||||
//TODO
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* End *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
53
Student_OMP/src/core/omp/02_Slice/07_pi_for_promotionTab.cpp
Executable file
53
Student_OMP/src/core/omp/02_Slice/07_pi_for_promotionTab.cpp
Executable file
@@ -0,0 +1,53 @@
|
||||
#include <omp.h>
|
||||
#include "Maths.h"
|
||||
#include "Omps.h"
|
||||
#include "99_pi_tools.h"
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* Declaration *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Public *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
bool isPiOMPforPromotionTab_Ok(int n);
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Private *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
static double piOMPforPromotionTab(int n);
|
||||
static void syntaxeSimplifier(double* tabSumThread , int n);
|
||||
static void syntaxeFull(double* tabSumThread , int n);
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* Implementation *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Public *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
bool isPiOMPforPromotionTab_Ok(int n)
|
||||
{
|
||||
return isAlgoPI_OK(piOMPforPromotionTab, n, "Pi OMP for promotion tab");
|
||||
}
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Private *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
/**
|
||||
* De-synchronisation avec PromotionTab
|
||||
*/
|
||||
double piOMPforPromotionTab(int n)
|
||||
{
|
||||
//TODO
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* End *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
51
Student_OMP/src/core/omp/02_Slice/08_pi_for_reduction.cpp
Executable file
51
Student_OMP/src/core/omp/02_Slice/08_pi_for_reduction.cpp
Executable file
@@ -0,0 +1,51 @@
|
||||
#include <omp.h>
|
||||
#include "Omps.h"
|
||||
#include "99_pi_tools.h"
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* Declaration *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Public *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
bool isPiOMPforReduction_Ok(int n);
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Private *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
static double piOMPforReduction(int n);
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* Implementation *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Public *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
bool isPiOMPforReduction_Ok(int n)
|
||||
{
|
||||
return isAlgoPI_OK(piOMPforReduction, n, "Pi OMP for reduction-integrer");
|
||||
}
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Private *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
/**
|
||||
* pattern omp usefull : idem desyncronisation-promotionTab ,mais avec syntaxe plus courte!
|
||||
* Si on enleve le pragma, le code est le meme que le sequentiel!
|
||||
*/
|
||||
double piOMPforReduction(int n)
|
||||
{
|
||||
//TODO
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* End *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
47
Student_OMP/src/core/omp/02_Slice/99_pi_tools.cpp
Executable file
47
Student_OMP/src/core/omp/02_Slice/99_pi_tools.cpp
Executable file
@@ -0,0 +1,47 @@
|
||||
#include "99_pi_tools.h"
|
||||
|
||||
#include <iostream>
|
||||
#include "ChronoFactory.h"
|
||||
#include "Maths.h"
|
||||
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* Implementation *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
double fpi(double x)
|
||||
{
|
||||
return 4 / (1 + x * x);
|
||||
}
|
||||
|
||||
bool isAlgoPI_OK(AlgoPI algoPI , int n , string title)
|
||||
{
|
||||
cout << endl << endl << "[" << title << " running ...]" << endl;
|
||||
cout << "\tn=" << n << endl;
|
||||
|
||||
Chrono* ptrChrono = ChronoFactory::create();
|
||||
double piHat = algoPI(n);
|
||||
ptrChrono->stop();
|
||||
|
||||
cout.precision(8);
|
||||
cout << "\tPi hat = " << piHat << endl;
|
||||
cout << "\tPi true = " << PI << endl;
|
||||
|
||||
bool isOk = Maths::isEquals(piHat, PI, 1e-6);
|
||||
cout << "\tisOk = " << isOk << endl;
|
||||
|
||||
cout.precision(3);
|
||||
cout<<"\ttime : "<<*ptrChrono<<endl;
|
||||
cout << endl;
|
||||
|
||||
delete ptrChrono;
|
||||
|
||||
return isOk;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* End *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
25
Student_OMP/src/core/omp/02_Slice/99_pi_tools.h
Executable file
25
Student_OMP/src/core/omp/02_Slice/99_pi_tools.h
Executable file
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
using std::string;
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* Declaration *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
// ptr fonction de type double xxx(int n)
|
||||
// ou xxx sera une methode de calcul de pi
|
||||
typedef double (*AlgoPI)(int);
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Methode *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
double fpi(double x);
|
||||
bool isAlgoPI_OK(AlgoPI algoPI, int n, string title);
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* End *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
46
Student_OMP/src/core/omp/02_Slice/usePI.cpp
Executable file
46
Student_OMP/src/core/omp/02_Slice/usePI.cpp
Executable file
@@ -0,0 +1,46 @@
|
||||
#include <iostream>
|
||||
#include <limits.h>
|
||||
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Imported *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
extern bool isPiSequentiel_OK(int n);
|
||||
extern bool isPiOMPEntrelacerPromotionTab_Ok(int n);
|
||||
extern bool isPiOMPEntrelacerCritical_Ok(int n);
|
||||
extern bool isPiOMPEntrelacerAtomic_Ok(int n);
|
||||
extern bool isPiOMPforCritical_Ok(int n);
|
||||
extern bool isPiOMPforAtomic_Ok(int n);
|
||||
extern bool isPiOMPforPromotionTab_Ok(int n);
|
||||
extern bool isPiOMPforReduction_Ok(int n);
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* Implementation *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
bool usePI()
|
||||
{
|
||||
cout << endl << "[PI]" << endl;
|
||||
|
||||
int n = INT_MAX / 10;
|
||||
|
||||
bool isOk = true;
|
||||
isOk &= isPiSequentiel_OK(n);
|
||||
isOk &= isPiOMPEntrelacerPromotionTab_Ok(n);
|
||||
isOk &= isPiOMPEntrelacerCritical_Ok(n);
|
||||
isOk &= isPiOMPEntrelacerAtomic_Ok(n);
|
||||
isOk &= isPiOMPforCritical_Ok(n);
|
||||
isOk &= isPiOMPforAtomic_Ok(n);
|
||||
isOk &= isPiOMPforPromotionTab_Ok(n);
|
||||
isOk &= isPiOMPforReduction_Ok(n);
|
||||
|
||||
return isOk;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* End *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
46
Student_OMP/src/main.cpp
Executable file
46
Student_OMP/src/main.cpp
Executable file
@@ -0,0 +1,46 @@
|
||||
#include <iostream>
|
||||
#include <limits.h>
|
||||
#include "Limits.h"
|
||||
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* Declaration *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Imported *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
extern int mainCore(void);
|
||||
extern int mainTest(void);
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Public *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
int main(void);
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* Implementation *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Public *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
int main(void)
|
||||
{
|
||||
cout << "main" << endl;
|
||||
|
||||
Limits::rappelTypeSize();
|
||||
|
||||
const bool IS_TEST = false;
|
||||
return IS_TEST ? mainTest() : mainCore();
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* End *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
44
Student_OMP/src/test/mainTest.cpp
Executable file
44
Student_OMP/src/test/mainTest.cpp
Executable file
@@ -0,0 +1,44 @@
|
||||
#include <stdlib.h>
|
||||
#include <iostream>
|
||||
|
||||
#include "CppTest.h"
|
||||
#include "Folders.h"
|
||||
|
||||
#include "TestHello.h"
|
||||
#include "TestPi.h"
|
||||
#include "Chrome.h"
|
||||
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* Implementation *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
int mainTest()
|
||||
{
|
||||
Test::Suite testSuite;
|
||||
|
||||
testSuite.add(std::auto_ptr < Test::Suite > (new TestHello()));
|
||||
testSuite.add(std::auto_ptr < Test::Suite > (new TestPi()));
|
||||
|
||||
// run
|
||||
{
|
||||
string folder = "./out";
|
||||
string title = "testAll";
|
||||
string fileHTML = title + ".html";
|
||||
|
||||
Folders::mkdirP(folder);
|
||||
|
||||
int result = CppTest::run(folder, fileHTML, title, testSuite, OutputType::HTML); // HTML CONSOLE
|
||||
|
||||
Chrome::showHTML(folder, fileHTML); // to be commented if OutputType::CONSOLE
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* End *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
34
Student_OMP/src/test/unit/01_Test_Hello/TestHello.cpp
Executable file
34
Student_OMP/src/test/unit/01_Test_Hello/TestHello.cpp
Executable file
@@ -0,0 +1,34 @@
|
||||
#include "TestHello.h"
|
||||
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Imported *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
extern void helloOMP1();
|
||||
extern void helloOMP2();
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* Implementation *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
TestHello::TestHello()
|
||||
{
|
||||
TEST_ADD(TestHello::testHelloOMP1);
|
||||
TEST_ADD(TestHello::testHelloOMP2);
|
||||
}
|
||||
|
||||
void TestHello::testHelloOMP1()
|
||||
{
|
||||
helloOMP1();
|
||||
}
|
||||
|
||||
void TestHello::testHelloOMP2()
|
||||
{
|
||||
helloOMP2();
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* End *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
25
Student_OMP/src/test/unit/01_Test_Hello/TestHello.h
Executable file
25
Student_OMP/src/test/unit/01_Test_Hello/TestHello.h
Executable file
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
#include "cpptest.h"
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* Declaration *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
class TestHello: public Test::Suite
|
||||
{
|
||||
public:
|
||||
|
||||
TestHello();
|
||||
|
||||
private:
|
||||
|
||||
void testHelloOMP1();
|
||||
void testHelloOMP2();
|
||||
|
||||
};
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* End *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
80
Student_OMP/src/test/unit/02_Test_Pi/TestPi.cpp
Executable file
80
Student_OMP/src/test/unit/02_Test_Pi/TestPi.cpp
Executable file
@@ -0,0 +1,80 @@
|
||||
#include "TestPi.h"
|
||||
#include <limits.h>
|
||||
|
||||
/*--------------------------------------*\
|
||||
|* Imported *|
|
||||
\*-------------------------------------*/
|
||||
|
||||
extern bool isPiSequentiel_OK(int n);
|
||||
extern bool isPiOMPEntrelacerPromotionTab_Ok(int n);
|
||||
extern bool isPiOMPEntrelacerCritical_Ok(int n);
|
||||
extern bool isPiOMPEntrelacerAtomic_Ok(int n);
|
||||
extern bool isPiOMPforCritical_Ok(int n);
|
||||
extern bool isPiOMPforAtomic_Ok(int n);
|
||||
extern bool isPiOMPforPromotionTab_Ok(int n);
|
||||
extern bool isPiOMPforReduction_Ok(int n);
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* Implementation *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
TestPi::TestPi()
|
||||
{
|
||||
this->n = INT_MAX / 10;
|
||||
|
||||
TEST_ADD(TestPi::testSequentiel);
|
||||
|
||||
TEST_ADD(TestPi::testEntrelacerPromotionTab);
|
||||
TEST_ADD(TestPi::testEntrelacerAtomic);
|
||||
TEST_ADD(TestPi::testEntrelacerCritical);
|
||||
|
||||
TEST_ADD(TestPi::testAtomic);
|
||||
TEST_ADD(TestPi::testCritical);
|
||||
TEST_ADD(TestPi::testPromotionTab);
|
||||
TEST_ADD(TestPi::testForReduction);
|
||||
}
|
||||
|
||||
void TestPi::testSequentiel()
|
||||
{
|
||||
TEST_ASSERT(isPiSequentiel_OK(n) == true);
|
||||
}
|
||||
|
||||
void TestPi::testEntrelacerPromotionTab()
|
||||
{
|
||||
TEST_ASSERT(isPiOMPEntrelacerPromotionTab_Ok(n) == true);
|
||||
}
|
||||
|
||||
void TestPi::testEntrelacerAtomic()
|
||||
{
|
||||
TEST_ASSERT(isPiOMPEntrelacerAtomic_Ok(n) == true);
|
||||
}
|
||||
|
||||
void TestPi::testEntrelacerCritical()
|
||||
{
|
||||
TEST_ASSERT(isPiOMPEntrelacerCritical_Ok(n) == true);
|
||||
}
|
||||
|
||||
void TestPi::testCritical()
|
||||
{
|
||||
TEST_ASSERT(isPiOMPforCritical_Ok(n) == true);
|
||||
}
|
||||
|
||||
void TestPi::testAtomic()
|
||||
{
|
||||
TEST_ASSERT(isPiOMPforAtomic_Ok(n) == true);
|
||||
}
|
||||
|
||||
void TestPi::testPromotionTab()
|
||||
{
|
||||
TEST_ASSERT(isPiOMPforPromotionTab_Ok(n) == true);
|
||||
}
|
||||
|
||||
void TestPi::testForReduction()
|
||||
{
|
||||
TEST_ASSERT(isPiOMPforReduction_Ok(n) == true);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* End *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
35
Student_OMP/src/test/unit/02_Test_Pi/TestPi.h
Executable file
35
Student_OMP/src/test/unit/02_Test_Pi/TestPi.h
Executable file
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
|
||||
#include "cpptest.h"
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* Declaration *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
||||
class TestPi: public Test::Suite
|
||||
{
|
||||
public:
|
||||
|
||||
TestPi(void);
|
||||
|
||||
private:
|
||||
|
||||
void testSequentiel();
|
||||
void testEntrelacerPromotionTab();
|
||||
void testEntrelacerAtomic();
|
||||
void testEntrelacerCritical();
|
||||
void testCritical();
|
||||
void testAtomic();
|
||||
void testPromotionTab();
|
||||
void testForReduction();
|
||||
|
||||
private:
|
||||
|
||||
int n;
|
||||
|
||||
};
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* End *|
|
||||
\*---------------------------------------------------------------------*/
|
||||
|
Reference in New Issue
Block a user