@ -1,50 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
CC="/usr/lib/colorgcc/bin/g++"
|
|
||||||
CC_OPTIONS="-Wall -Wextra -pedantic -Wshadow -Weffc++"
|
|
||||||
CC_OPTIMIZE_OPTIONS="-O3 -ffast-math -fwhole-program -fomit-frame-pointer -march=native -m64"
|
|
||||||
CC_LIBS="-lrt"
|
|
||||||
CC_OPENMP="-fopenmp"
|
|
||||||
CC_ITBB="-ltbb"
|
|
||||||
QT_PRO="qtconcurrent.pro"
|
|
||||||
|
|
||||||
echo "CC: $CC"
|
|
||||||
echo "CC options: $CC_OPTIONS"
|
|
||||||
echo "CC optimalization options: $CC_OPTIMIZE_OPTIONS"
|
|
||||||
echo "CC libs: $CC_LIBS"
|
|
||||||
echo "CC openMP options: $CC_OPENMP"
|
|
||||||
echo "CC intel TBB options: $CC_ITBB"
|
|
||||||
|
|
||||||
echo -e "\nSerial algorithms:"
|
|
||||||
for serial in $(ls serial*.cpp)
|
|
||||||
do
|
|
||||||
echo "Compiling $serial ..."
|
|
||||||
$CC $serial $CC_OPTION $CC_OPTIMIZE_OPTIONS $CC_LIBS -o ${serial%\.*}
|
|
||||||
done
|
|
||||||
|
|
||||||
echo -e "\nopenMP algorithms:"
|
|
||||||
for openMP in $(ls openMp*.cpp)
|
|
||||||
do
|
|
||||||
echo "Compiling $openMP ..."
|
|
||||||
$CC $openMP $CC_OPTION $CC_OPTIMIZE_OPTIONS $CC_LIBS $CC_OPENMP -o ${openMP%\.*}
|
|
||||||
done
|
|
||||||
|
|
||||||
echo -e "\nintel TBB algorithms:"
|
|
||||||
for itbb in $(ls itbb*.cpp)
|
|
||||||
do
|
|
||||||
echo "Compiling $itbb ..."
|
|
||||||
$CC $itbb $CC_OPTION $CC_OPTIMIZE_OPTIONS $CC_LIBS $CC_ITBB -o ${itbb%\.*}
|
|
||||||
done
|
|
||||||
|
|
||||||
echo -e "\nQt Concurrent algorithms:"
|
|
||||||
echo "Generating qmake project file ..."
|
|
||||||
|
|
||||||
QT_PRO_CONTENT=$( cat <<EOF
|
|
||||||
config_map {
|
|
||||||
TEMPLATE = app
|
|
||||||
SOURCES = QT_map.cpp
|
|
||||||
TARGET = QT_map
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
)
|
|
||||||
echo $QT_PRO_CONTENT > $QT_PRO
|
|
@ -1,27 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
QT_PRO="qtconcurrent.pro"
|
|
||||||
|
|
||||||
echo -e "\nQt Concurrent algorithms:"
|
|
||||||
echo "Generating qmake project file ..."
|
|
||||||
|
|
||||||
QT_PRO_CONTENT=""
|
|
||||||
|
|
||||||
# QT_PRO_CONTENT=$( cat <<EOF
|
|
||||||
#read -d '' QT_PRO_CONTENT <<"EOF"
|
|
||||||
cat > $QT_PRO <<_EOF_
|
|
||||||
config_map {
|
|
||||||
TEMPLATE = app
|
|
||||||
QT = core
|
|
||||||
CONFIG = console
|
|
||||||
CXXFLAGS = -Wextra
|
|
||||||
|
|
||||||
|
|
||||||
TARGET = QT_map
|
|
||||||
SOURCES = QT_map.cpp
|
|
||||||
}
|
|
||||||
_EOF_
|
|
||||||
|
|
||||||
|
|
||||||
echo -e $QT_PRO_CONTENT
|
|
||||||
|
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 743 KiB After Width: | Height: | Size: 743 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 342 KiB After Width: | Height: | Size: 342 KiB |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
@ -0,0 +1,61 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
CC="/usr/lib/colorgcc/bin/g++"
|
||||||
|
CC_OPTIONS="-Wall -Wextra -pedantic -Wshadow -Weffc++"
|
||||||
|
CC_OPTIMIZE_OPTIONS="-O3 -ffast-math -fwhole-program -fomit-frame-pointer -march=native"
|
||||||
|
CC_LIBS="-lrt"
|
||||||
|
CC_OPENMP="-fopenmp"
|
||||||
|
CC_ITBB="-ltbb"
|
||||||
|
|
||||||
|
BUILD_DIR="../build"
|
||||||
|
SERIAL_SRC="../serial"
|
||||||
|
ITBB_SRC="../itbb"
|
||||||
|
OPENMP_SRC="../openMP"
|
||||||
|
|
||||||
|
echo "CC: $CC"
|
||||||
|
echo "CC options: $CC_OPTIONS"
|
||||||
|
echo "CC optimalization options: $CC_OPTIMIZE_OPTIONS"
|
||||||
|
echo "CC libs: $CC_LIBS"
|
||||||
|
echo "CC openMP options: $CC_OPENMP"
|
||||||
|
echo "CC intel TBB options: $CC_ITBB"
|
||||||
|
|
||||||
|
rm -rf $BUILD_DIR
|
||||||
|
mkdir $BUILD_DIR
|
||||||
|
cd $BUILD_DIR
|
||||||
|
|
||||||
|
echo -e "\nSerial algorithms..."
|
||||||
|
for serial in $(ls $SERIAL_SRC/serial*.cpp)
|
||||||
|
do
|
||||||
|
BASENAME=`basename $serial`
|
||||||
|
echo "Compiling $BASENAME ..."
|
||||||
|
$CC $serial $CC_OPTION $CC_OPTIMIZE_OPTIONS $CC_LIBS -o $BUILD_DIR/${BASENAME%\.*}
|
||||||
|
done
|
||||||
|
|
||||||
|
echo -e "\nopenMP algorithms..."
|
||||||
|
for openMP in $(ls $OPENMP_SRC/openMp*.cpp)
|
||||||
|
do
|
||||||
|
BASENAME=`basename $openMP`
|
||||||
|
echo "Compiling $BASENAME ..."
|
||||||
|
$CC $openMP $CC_OPTION $CC_OPTIMIZE_OPTIONS $CC_LIBS $CC_OPENMP -o $BUILD_DIR/${BASENAME%\.*}
|
||||||
|
done
|
||||||
|
|
||||||
|
echo -e "\nIntel Thrad Building Blocks algorithms..."
|
||||||
|
for itbb in $(ls $ITBB_SRC/itbb*.cpp)
|
||||||
|
do
|
||||||
|
BASENAME=`basename $itbb`
|
||||||
|
echo "Compiling $BASENAME ..."
|
||||||
|
$CC $itbb $CC_OPTION $CC_OPTIMIZE_OPTIONS $CC_LIBS $CC_ITBB -o $BUILD_DIR/${BASENAME%\.*}
|
||||||
|
done
|
||||||
|
|
||||||
|
echo -e "\nGenerating QT project file & compilin QT algorithms ..."
|
||||||
|
../scripts/gen_qt_pro.sh
|
||||||
|
|
||||||
|
# NOTE does not work yet
|
||||||
|
qmake parallel.pro -config config_map
|
||||||
|
make
|
||||||
|
qmake parallel.pro -config config_sort
|
||||||
|
make
|
||||||
|
qmake parallel.pro -config config_reduce
|
||||||
|
make
|
||||||
|
|
||||||
|
|
@ -0,0 +1,40 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
QT_PRO="parallel.pro"
|
||||||
|
SRC_DIR="../qtconcurrent"
|
||||||
|
CXX_FLAGS="-Wall -Wextra -O3 -ffast-math -fwhole-program -fomit-frame-pointer -march=native"
|
||||||
|
|
||||||
|
echo "Generating qmake project file: $QT_PRO ..."
|
||||||
|
|
||||||
|
cat > $QT_PRO <<_EOF_
|
||||||
|
config_map {
|
||||||
|
TEMPLATE = app
|
||||||
|
QT = core
|
||||||
|
QMAKE_CXX = /usr/lib/colorgcc/bin/g++
|
||||||
|
QMAKE_CXXFLAGS = $CXX_FLAGS
|
||||||
|
TARGET = qt_map
|
||||||
|
SOURCES = $SRC_DIR/qt_map.cpp
|
||||||
|
}
|
||||||
|
|
||||||
|
config_sort {
|
||||||
|
TEMPLATE = app
|
||||||
|
QT = core
|
||||||
|
QMAKE_CXX = /usr/lib/colorgcc/bin/g++
|
||||||
|
QMAKE_CXXFLAGS = $CXX_FLAGS
|
||||||
|
TARGET = qt_sort
|
||||||
|
INCLUDEPATH += $SRC_DIR
|
||||||
|
SOURCES = $SRC_DIR/qt_sort.cpp
|
||||||
|
}
|
||||||
|
|
||||||
|
config_reduce {
|
||||||
|
TEMPLATE = app
|
||||||
|
QT = core
|
||||||
|
QMAKE_CXX = colorgcc
|
||||||
|
QMAKE_CXXFLAGS = $CXX_FLAGS
|
||||||
|
TARGET = qt_reduce
|
||||||
|
SOURCES = $SRC_DIR/qt_reduce.cpp
|
||||||
|
}
|
||||||
|
|
||||||
|
_EOF_
|
||||||
|
|
||||||
|
|