summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2013-08-15 07:10:01 -0600
committerErik Schnetter <schnetter@gmail.com>2013-08-15 07:10:01 -0600
commit95bff92500e5b4dedb033331cd8cf2d2735066fc (patch)
treebde92e02f407fe8c518c26e19ea418db9c47d4c5
parent7e66f4a982ad1e7e9ae4a94ee5f91d6648948a40 (diff)
downloadvecmathlib-95bff92500e5b4dedb033331cd8cf2d2735066fc.zip
vecmathlib-95bff92500e5b4dedb033331cd8cf2d2735066fc.tar.gz
Clean up build mechanism
-rw-r--r--BUILD33
-rw-r--r--CMakeLists.txt39
-rwxr-xr-xautogen.sh2
-rw-r--r--pocl/CMakeLists.txt20
4 files changed, 34 insertions, 60 deletions
diff --git a/BUILD b/BUILD
index c9df674..0d8795c 100644
--- a/BUILD
+++ b/BUILD
@@ -18,3 +18,36 @@ Test:
Benchmark:
./bench
+
+
+
+rm -rf CMakeCache.txt CMakeFiles
+
+
+# Clang:
+# C++11: -std=c++11 -stdlib=libc++
+# fast math: -ffast-math
+
+# GCC:
+# C++11: -std=c++11
+# fast math: -ffast-math
+
+
+
+# Redshift (OS X):
+cmake -DCMAKE_CXX_COMPILER=g++-mp-4.7 -DCMAKE_CXX_FLAGS='-Wall -g -Drestrict=__restrict__ -march=native -O3' -G Ninja
+cmake -DCMAKE_CXX_COMPILER=g++-mp-4.8 -DCMAKE_CXX_FLAGS='-Wall -g -Drestrict=__restrict__ -march=native -O3' -G Ninja
+cmake -DCMAKE_CXX_COMPILER=clang++-mp-3.2 -DCMAKE_CXX_FLAGS='-Wall -g -Drestrict=__restrict__ -march=native -O3' -G Ninja
+cmake -DCMAKE_CXX_COMPILER=clang++-mp-3.3 -DCMAKE_CXX_FLAGS='-Wall -g -Drestrict=__restrict__ -march=native -O3' -G Ninja
+
+# Vesta (Power 7):
+#cmake -DCMAKE_CXX_COMPILER=xlC_r -DCMAKE_CXX_FLAGS='-O3' .
+#/soft/compilers/ibmcmp-may2013/vacpp/bg/12.1/bin/xlC_r -O3 -o test test.cc
+/soft/compilers/ibmcmp-may2013/vacpp/bg/12.1/bin/xlC_r -O2 -o test test.cc
+#cmake -DCMAKE_CXX_COMPILER=/home/projects/llvm/bin/clang++ -DCMAKE_CXX_FLAGS='-O3 -faltivec' .
+/home/projects/llvm/bin/clang++ -O3 -faltivec -o test test.cc
+
+# Vesta (Blue Gene/Q):
+/soft/compilers/ibmcmp-may2013/vacpp/bg/12.1/bin/bgxlC_r -O3 -o test test.cc -lmass_simd
+#cmake -DCMAKE_CXX_COMPILER=/home/projects/llvm/bin/bgclang++ -DCMAKE_CXX_FLAGS='-O3 -I/soft/compilers/ibmcmp-may2013/xlmass/bg/7.3/include' .
+/home/projects/llvm/bin/bgclang++ -O3 -I/soft/compilers/ibmcmp-may2013/xlmass/bg/7.3/include -o test test.cc -L/soft/compilers/ibmcmp-may2013/xlmass/bg/7.3/bglib64 -lmass_simd
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1cd8a48..1da11d9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,42 +11,3 @@ add_executable (test test.cc)
add_executable (bench bench.cc)
add_library (instantiations instantiations.cc)
-
-# add_subdirectory (pocl)
-
-
-
-# Generic x86-64:
-
-# # Clang 3.3:
-# set (CMAKE_CXX_COMPILER "clang++")
-# set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g -std=c++11 -stdlib=libc++ -march=native -O4 -ffast-math")
-
-# # GCC 4.7:
-# set (CMAKE_CXX_COMPILER "g++-")
-# set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g -std=c++11 -march=native -Ofast")
-
-# # Intel:
-# set (CMAKE_CXX_COMPILER "icpc")
-# set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g -std=c++11 -fast")
-
-
-
-# OSX with MacPorts:
-
-# # Clang:
-# # Note: This fails to link with -O4
-# set (CMAKE_CXX_COMPILER "clang++-mp-3.3")
-# set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g -std=c++11 -stdlib=libc++ -march=native -O3 -ffast-math")
-
-# # GCC 4.8:
-# set (CMAKE_CXX_COMPILER "g++-mp-4.8")
-# set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g -std=c++11 -march=native -Ofast")
-
-
-
-# PS3:
-
-# # GCC 4.6:
-# set (CMAKE_CXX_COMPILER "g++")
-# set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g -std=c++0x -maltivec -Ofast")
diff --git a/autogen.sh b/autogen.sh
index 1f83a81..2f8e57d 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -8,5 +8,5 @@ rm -f CMakeCache.txt
cmake -G 'Unix Makefiles'
# Ninja (build with "ninja")
-# Note: Ninja is ofteh faster than make, but may not always be available
#cmake -G Ninja
+# Note: Ninja is often faster than make, but may not always be available
diff --git a/pocl/CMakeLists.txt b/pocl/CMakeLists.txt
deleted file mode 100644
index 9c8d19c..0000000
--- a/pocl/CMakeLists.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-# See file "BUILD" for instructions
-
-set (GENERATED_SRCS
-acos.cc acosh.cc asin.cc asinh.cc atan.cc atanh.cc cbrt.cc ceil.cc copysign.cc cos.cc cosh.cc exp.cc exp2.cc exp10.cc expm1.cc fabs.cc fdim.cc floor.cc fma.cc fmax.cc fmin.cc fmod.cc hypot.cc ilogb_.cc ldexp_.cc log.cc log2.cc log10.cc log1p.cc pow.cc remainder.cc rint.cc round.cc rsqrt.cc sin.cc sinh.cc sqrt.cc tan.cc tanh.cc trunc.cc isfinite.cc isinf.cc isnan.cc isnormal.cc signbit.cc acospi.cl asinpi.cl atanpi.cl atan2.cl atan2pi.cl cospi.cl fmax.cl fmin.cl fract.cl frexp.cl ilogb.cl ldexp.cl logb.cl mad.cl maxmag.cl minmag.cl modf.cl nan.cl pown.cl powr.cl remquo.cl rootn.cl sincos.cl sinpi.cl tanpi.cl half_cos.cl half_divide.cl half_exp.cl half_exp2.cl half_exp10.cl half_log.cl half_log2.cl half_log10.cl half_powr.cl half_recip.cl half_rsqrt.cl half_sin.cl half_sqrt.cl half_tan.cl native_cos.cl native_divide.cl native_exp.cl native_exp2.cl native_exp10.cl native_log.cl native_log2.cl native_log10.cl native_powr.cl native_recip.cl native_rsqrt.cl native_sin.cl native_sqrt.cl native_tan.cl clamp.cl degrees.cl max.cl min.cl mix.cl radians.cl step.cl smoothstep.cl sign.cl isequal.cl isnotequal.cl isgreater.cl isgreaterequal.cl isless.cl islessequal.cl islessgreater.cl isordered.cl isunordered.cl
- )
-
-set (SRCS
- cross.cl dot.cl distance.cl length.cl normalize.cl fast_distance.cl
- fast_length.cl fast_normalize.cl
- ${GENERATED_SRCS}
-)
-
-add_custom_command (
- OUTPUT ${GENERATED_SRCS} kernel-vecmathlib.h
- COMMAND ${CMAKE_SOURCE_DIR}/pocl/generate-files.py
- DEPENDS generate-files.py)
-include_directories(${CMAKE_SOURCE_DIR}/pocl)
-add_library (kernel-vecmathlib ${SRCS})
-
-set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Dcl_khr_fp64 -Dcles_khr_int64")
OpenPOWER on IntegriCloud