mirror of https://github.com/jlizier/jidt
Added proper source and header files for digamma implementation.
This commit is contained in:
parent
7546dcfc06
commit
5ba6cd093e
|
|
@ -32,7 +32,7 @@ libgpuKnnLibrary.a: gpuKnnLibrary.o
|
|||
${AR} -r libgpuKnnLibrary.a gpuKnnLibrary.o
|
||||
|
||||
libKraskov.so: libgpuKnnLibrary.a kraskovCuda.c
|
||||
${NVCC} ${NVCCFLAGS} ${INCLUDES} -Xcompiler -fPIC -shared -o libKraskov.so gpuMILibrary.c kraskovCuda.c ${LDFLAGS} -lgpuKnnLibrary
|
||||
${NVCC} ${NVCCFLAGS} ${INCLUDES} -Xcompiler -fPIC -shared -o libKraskov.so digamma.c gpuMILibrary.c kraskovCuda.c ${LDFLAGS} -lgpuKnnLibrary
|
||||
|
||||
test: libKraskov.so
|
||||
${GCC} -std=c++11 -o unittest unittests.cpp -L. -lKraskov
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
Richard J. Mathar, 2005-11-24
|
||||
***************************************/
|
||||
#include <math.h>
|
||||
#include "digamma.h"
|
||||
|
||||
#ifndef M_PIl
|
||||
/** The constant Pi in high precision */
|
||||
|
|
@ -30,9 +31,6 @@
|
|||
* @author Richard J. Mathar
|
||||
* @since 2005-11-24
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
long double cpuDigamma(long double x)
|
||||
{
|
||||
int n;
|
||||
|
|
@ -114,7 +112,4 @@ long double cpuDigamma(long double x)
|
|||
return resul ;
|
||||
}
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
#ifndef DIGAMMA_H
|
||||
#define DIGAMMA_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
long double cpuDigamma(long double x);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "gpuMILibrary.h"
|
||||
#include "gpuKnnLibrary.h"
|
||||
#include "digamma.c"
|
||||
#include "digamma.h"
|
||||
|
||||
jidt_error_t MIKraskov_C(int N, float *source, int dimx, float *dest, int dimy,
|
||||
int k, int thelier, int nchunks, int returnLocals, int useMaxNorm,
|
||||
|
|
|
|||
Loading…
Reference in New Issue