diff --git a/src/Function1D.cu b/src/Function1D.cu index 9de58ae..ea42b5a 100644 --- a/src/Function1D.cu +++ b/src/Function1D.cu @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -1480,3 +1481,112 @@ CudaMatrix Aurora::createCudaVectorMatrix(float aStartValue, float aStepValue, f return Matrix::copyFromRawData(matrixData.data(), 1, matrixData.size()).toDeviceMatrix(); } + +struct compareMatrixByRows +{ + compareMatrixByRows(unsigned int aSize) + : mSize(aSize) + { + }; + unsigned int mSize; + __host__ __device__ + bool operator()(const float* aVector1, const float* aVector2) const + { + for(unsigned int i=0; i aVector2[i]) + { + return false; + } + } + return false; + } +}; + +struct uniqueMatrixByRows +{ + uniqueMatrixByRows(unsigned int aSize) + : mSize(aSize) + { + }; + unsigned int mSize; + __host__ __device__ + bool operator()(const float* aVector1, const float* aVector2) const + { + for(unsigned int i=0; i vector(columns); + float* indexResult = new float[columns]; + std::vector vectorCopy(columns); + for(unsigned int i=0; i