Add complex,real,imag,ceil,round,floor,sqrt,abs,sign and unittest.
This commit is contained in:
44
src/Function1D.cuh
Normal file
44
src/Function1D.cuh
Normal file
@@ -0,0 +1,44 @@
|
||||
#ifndef AURORA_CUDA_FUNCTION1D_H
|
||||
#define AURORA_CUDA_FUNCTION1D_H
|
||||
|
||||
#include "CudaMatrix.h"
|
||||
|
||||
namespace Aurora
|
||||
{
|
||||
CudaMatrix complex(const CudaMatrix& aMatrix);
|
||||
|
||||
CudaMatrix real(const CudaMatrix& aMatrix);
|
||||
|
||||
CudaMatrix imag(const CudaMatrix& aMatrix);
|
||||
|
||||
CudaMatrix ceil(const CudaMatrix& aMatrix);
|
||||
|
||||
CudaMatrix ceil(const CudaMatrix&& aMatrix);
|
||||
|
||||
CudaMatrix round(const CudaMatrix& aMatrix);
|
||||
|
||||
CudaMatrix round(const CudaMatrix&& aMatrix);
|
||||
|
||||
CudaMatrix floor(const CudaMatrix& aMatrix);
|
||||
|
||||
CudaMatrix floor(const CudaMatrix&& aMatrix);
|
||||
|
||||
/**
|
||||
* 开根号,暂时只支持正整数
|
||||
* @param matrix
|
||||
* @return
|
||||
*/
|
||||
CudaMatrix sqrt(const CudaMatrix& aMatrix);
|
||||
|
||||
CudaMatrix sqrt(const CudaMatrix&& aMatrix);
|
||||
|
||||
CudaMatrix abs(const CudaMatrix& aMatrix);
|
||||
|
||||
CudaMatrix abs(const CudaMatrix&& aMatrix);
|
||||
|
||||
CudaMatrix sign(const CudaMatrix& aMatrix);
|
||||
|
||||
CudaMatrix sign(const CudaMatrix&& aMatrix);
|
||||
}
|
||||
|
||||
#endif //AURORA_CUDA_FUNCTION1D_H
|
||||
Reference in New Issue
Block a user