 __device__
 void safe_memset3(double* dest1, double* dest2, double* dest3, const double val)
 {
-	#pragma unroll 1
+	#pragma unroll 8
 	for (int i = 0; i < NSP; i++)
 	{
 		dest1[i] = val;

*/
__device__ void RK_Decomp(double H, double* E1, cuDoubleComplex* E2, const double* Jac, int* ipiv1, int* ipiv2, int* info) {
	cuDoubleComplex temp = make_cuDoubleComplex(rkAlpha/H, rkBeta/H);
	#pragma unroll 1
	for (int i = 0; i < NSP; i++)
	{
		#pragma unroll 1
		for(int j = 0; j < NSP; j++)
		{
			E1[i + j * NSP] = -Jac[i + j * NSP];



__device__ void WADD(const double* X, const double* Y, double* Z) {
	#pragma unroll 8
	for (int i = 0; i < NSP; i++)
	{
		Z[i] = X[i] + Y[i];
