     output[result_idx] = sh_result[sh_idx];
   }
 }
+
 
 /*
 __device__ void _write_results(PMatrix* data, PMatrix* params,

		}
	  }
	}

	// can't fit max_block_params sets of parameters into the shared memory,
	// uh oh
	if (data_per == 0) {

            float discrim;
            float* tData = x + obs * DATA_PADDED_DIM;
            float* tDensityInfo = density + component * PACK_DIM;
            float* tMean = tDensityInfo;
            float* tSigma = tDensityInfo + D;
            float  tP = tDensityInfo[LOGDET_OFFSET];
            float  tLogDet = tDensityInfo[LOGDET_OFFSET+1];
