 }
 
 template<typename InType, typename OutType>
-inline void launch_fir_kernel(int          ncoeff,
-                              int          decim, 
-                              int          ntime, 
-                              int          nantpol,
+inline void launch_fir_kernel(unsigned int ncoeff,
+                              unsigned int decim, 
+                              unsigned int ntime, 
+                              unsigned int nantpol,
                               double*      coeffs,
                               Complex64*   state0,
                               Complex64*   state1,

	cudaStream_t _stream;
public:
	BFfir_impl() : _coeffs(NULL), _decim(1), _stream(g_cuda_stream) {}
	inline IType ncoeff()   const { return _ncoeff;  }
	inline IType decim()    const { return _decim;   }
	inline IType nantpol()  const { return _nantpol; }
	void init(IType ncoeffs,
	          IType nantpol, 
	          IType decim) {
		BF_TRACE();
		_decim   = decim;
		_ncoeff  = ncoeffs;

                              OutType*     d_out,
                              cudaStream_t stream=0) {
	//cout << "LAUNCH for " << nelement << endl;
	dim3 block(std::min(256u, nantpol), 256u/std::min(256u, nantpol));
	int first = std::min((nantpol-1)/block.x+1, 65535u);
	int secnd = std::min((ntime/decim-1)/block.y+1, 65535u);
	int third = std::min((ntime/decim-secnd*block.y-1)/secnd+2, 65535u);
