 	int *allocPointer = reinterpret_cast<int *>(extraPointers[3]);
 	double *reductionPointer = reinterpret_cast<double *>(extraPointers[4]);
 
-	transformDouble<<<1,launchDims.y,launchDims.z, *stream>>>(
-			opNum,
-			xPointer,
-			xShapeInfoPointer,
-			extraParamsPointer,
-			resultPointer,resultShapeInfoPointer, allocPointer, reductionPointer);
-
+	// simple trick to get workaround over reductions into scalar
+	if (shape::isVector((int *)&extraPointers[0]) && opNum >= 38 && opNum <= 41) {
+		transformDouble <<<1, launchDims.y, launchDims.z, *stream >>> (
+				opNum,
+				xPointer,
+				xShapeInfoPointer,
+				extraParamsPointer,
+				resultPointer, resultShapeInfoPointer, allocPointer, reductionPointer);
+	} else {
+		transformDouble <<<launchDims.x, launchDims.y, launchDims.z, *stream >>> (
+				opNum,
+				xPointer,
+				xShapeInfoPointer,
+				extraParamsPointer,
+				resultPointer, resultShapeInfoPointer, allocPointer, reductionPointer);
+	}
 	checkCudaErrors(cudaStreamSynchronize(*stream));
 }
 

	int *allocPointer = reinterpret_cast<int *>(extraPointers[3]);
	float *reductionPointer = reinterpret_cast<float *>(extraPointers[4]);

	transformFloat<<<1,launchDims.y, launchDims.z * 3, *stream>>>(
			opNum,
			xPointer,
			xShapeInfoPointer,
			extraParamsPointer,
			resultPointer,resultShapeInfoPointer, allocPointer, reductionPointer);

	checkCudaErrors(cudaStreamSynchronize(*stream));

}

	int *allocPointer = reinterpret_cast<int *>(extraPointers[3]);
	double *reductionPointer = reinterpret_cast<double *>(extraPointers[4]);

	transformDoubleIndexes<<<launchDims.x,launchDims.y,launchDims.z, *stream>>>(
			opNum,
			xPointer,
			xShapeInfoPointer,
