Commit 042f92c6 authored by Berenger Bramas's avatar Berenger Bramas

rebase against master -- remove operators

parent 2ac27543
......@@ -85,7 +85,6 @@ if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "ppc64le")
set(ALL_TYPES "ALTIVEC")
set(ALTIVEC_CPU_RULES "")
set(ALL_USED_TYPES "SCALAR")
set(INASTEMP_USE_SCALAR ON)
set(INASTEMP_CXX_FLAGS "-std=c++11")
else()
......
#include <altivec.h>
int main() {
__vector double tx;
__vector double ty;
tx = ty + tx;
tx = ty * tx;
tx = ty - tx;
tx = ty / tx;
tx += ty;
tx -= ty;
tx *= ty;
tx /= ty;
return 0;
}
///////////////////////////////////////////////////////////////////////////
// Inastemp - Berenger Bramas MPCDF - 2016
// Under MIT Licence, please you must read the LICENCE file.
///////////////////////////////////////////////////////////////////////////
#ifndef INAALTIVECOPERATORS_HPP
#define INAALTIVECOPERATORS_HPP
#include "InastempConfig.h"
#ifndef INASTEMP_USE_ALTIVEC
#error InaALTIVECOperators is included but ALTIVEC is not enable in the configuration
#endif
#include <altivec.h>
#undef bool
#undef vector
#undef pixel
#ifdef INASTEMP_USE_ALTIVEC_OPERATORS
#error Operators for ALTIVEC must exist, we cannot overload this type operators.
#endif
#endif
......@@ -6,7 +6,6 @@
#define INAVECALTIVECDOUBLE_HPP
#include "InastempConfig.h"
#include "InaALTIVECOperators.hpp"
#include "Common/InaIfElse.hpp"
#include "Common/InaUtils.hpp"
......@@ -226,20 +225,6 @@ public:
return *this;
}
static void print(__vector double val){ // TODO remove
for(int idx = 0 ; idx < 2 ; idx++){
printf("[%d] %lf\n", idx, vec_extract(val, idx));
}
printf("\n");
}
static void print(__vector unsigned char val){ // TODO remove
for(int idx = 0 ; idx < 16 ; idx++){
printf("[%d] %i\n", idx, (int)vec_extract(val, idx));
}
printf("\n");
}
inline InaVecALTIVEC& setFromIndirectArray(const double values[], const int inIndirection[]) {
alignas(16) const std::array<double, 2> tmp = {{
values[inIndirection[0]],
......
......@@ -6,7 +6,6 @@
#define INAVECALTIVECFLOAT_HPP
#include "InastempConfig.h"
#include "InaALTIVECOperators.hpp"
#include "Common/InaIfElse.hpp"
#include "Common/InaUtils.hpp"
......
......@@ -27,7 +27,6 @@
#cmakedefine INASTEMP_USE_AVX512SKL
#cmakedefine INASTEMP_USE_ALTIVEC
#cmakedefine INASTEMP_USE_ALTIVEC_OPERATORS
// Inform about best one
#define INASTEMP_@INASTEMP_BESTTYPE@_IS_BEST
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment