
#ifndef _INCLUDE_SEMI_BLIND_ICA_H_
#define _INCLUDE_SEMI_BLIND_ICA_H_

#ifdef __cplusplus
extern "C" {
#endif

//#define SBICA_CUDA_ENABLE

#ifdef SBICA_CUDA_ENABLE

typedef struct _MEM_t_
{
	char name[32];
	unsigned int kind;
	unsigned int dim;
	unsigned int nx;
	unsigned int ny;
	unsigned int nz;
	unsigned int size;
	unsigned int alllen;
	void **data_2d;
	void ***data_3d;
	void *h_ptr;
	void *d_ptr;
} MEM_t;

extern void **h_cudaMalloc2D(MEM_t *mem_t, const char *name, unsigned int kind, unsigned int ny, unsigned int nx, size_t size);
extern void ***h_cudaMalloc3D(MEM_t *mem_t, const char *name, unsigned int kind, unsigned int nz, unsigned int ny, unsigned int nx, size_t size);
extern void h_cudaFree2D(MEM_t *mem_t);
extern void h_cudaFree3D(MEM_t *mem_t);
extern void h_printMem(MEM_t *mem_t);

#endif // SBICA_CUDA_ENABLE
extern void h_cudaDeviceReset(void);

extern int HASetParamSemiBlindICA(const int thread_no, Param_SemiBlindICA_t *param);
extern int HAInitSemiBlindICA(const int thread_no);
extern int HAReleaseSemiBlindICA(const int thread_no);

#ifdef SBICA_CUDA_ENABLE
extern int SemiBlindICA(const int thread_no, int frame_count, MEM_t *out_data_p, MEM_t *in_data_p);
#else // SBICA_CUDA_ENABLE
extern int SemiBlindICA(const int thread_no, int frame_count, COMPLEX_FLOAT **out_data, COMPLEX_FLOAT **in_data);
#endif // SBICA_CUDA_ENABLE

#ifdef __cplusplus
}
#endif

#endif /* End of _INCLUDE_SEMI_BLIND_ICA_H_ */

/* EOF */



