 void TrueBroadcastBoolHelper<X,Y>::exec(const nd4j::broadcast::BoolOps opNum, const NDArray& xArr, const NDArray& yArr, NDArray& zArr) {
 
     dim3 launchDims;
-    launchDims.x = 128; //MAX_NUM_THREADS / 8;   // threadsPerBlock
-    launchDims.y = 256; //(zArr.lengthOf() + launchDims.x - 1) / launchDims.x;  // blocksPerGrid
-    launchDims.z = 1024; // sharedMem
+
+    launchDims.y = MAX_NUM_THREADS / 8;   // threadsPerBlock
+    launchDims.x = (zArr.lengthOf() + launchDims.y - 1) / launchDims.y;  // blocksPerGrid
+    launchDims.z = sizeof(Nd4jLong) * launchDims.y * (xArr.rankOf() + yArr.rankOf() + zArr.rankOf()) + 128; // sharedMe
 
     PointersManager manager(xArr.getContext(), "TrueBroadcastBoolHelper<X,Y>::exec");
 


    dim3 launchDims;

    launchDims.x = 128; //MAX_NUM_THREADS / 8;   // threadsPerBlock
    launchDims.y = 256; //(zArr.lengthOf() + launchDims.x - 1) / launchDims.x;  // blocksPerGrid
    launchDims.z = 1024; // sharedMem

    PointersManager manager(xArr.getContext(), "TrueBroadcastHelper<X,Y,Z>::exec");


    }
    __syncthreads();

    auto xCoords = sharedMem + threadIdx.x * (xRank + yRank + zRank);
    auto yCoords = xCoords + xRank;
    auto zCoords = yCoords + yRank;

    const auto tid = blockIdx.x * blockDim.x + threadIdx.x;

