def METHOD_NAME(self):
    """
    tests the "compact" kernel
    """
    nbkeypoints = 10000  # constant value
    keypoints = numpy.random.rand(nbkeypoints, 4).astype(numpy.float32)
    nb_ones = 0
    for i in range(nbkeypoints):
        if ((numpy.random.rand(1))[0] < 0.25):  # discard about 1 out of 4
            keypoints[i] = (-1, -1, i, -1)
            nb_ones += 1
        else:
            keypoints[i, 2] = i
    gpu_keypoints = pyopencl.array.to_device(self.queue, keypoints)
    output = pyopencl.array.empty(self.queue, (nbkeypoints, 4), dtype=numpy.float32, order="C")
    output.fill(-1.0, self.queue)
    counter = pyopencl.array.empty(self.queue, (1,), dtype=numpy.int32)
    counter.fill(0)
    wg = self.wg_compact,
    shape = calc_size((keypoints.shape[0],), wg)
    nbkeypoints = numpy.int32(nbkeypoints)
    startkeypoints = numpy.int32(0)
    t0 = time.time()
    try:
        k1 = self.program.compact(self.queue, shape, wg,
                                  gpu_keypoints.data, output.data, counter.data, startkeypoints, nbkeypoints)
    except pyopencl.LogicError as error:
        logger.warning("%s in test_compact", error)
    res = output.get()
    count = counter.get()[0]
    t1 = time.time()
    ref, count_ref = my_compact(keypoints, nbkeypoints)
    t2 = time.time()
    logger.debug("Kernel counter : %s / Python counter : %s / True value : %s",
                 count, count_ref, nbkeypoints - nb_ones)
    res_sort_arg = res[:, 2].argsort(axis=0)
    res_sort = res[res_sort_arg]
    ref_sort_arg = ref[:, 2].argsort(axis=0)
    ref_sort = ref[ref_sort_arg]
    delta = abs((res_sort - ref_sort)).max()
    self.assertLess(delta, 1e-5, "delta=%s" % (delta))
    self.assertEqual(count, count_ref, "counters are the same")
    logger.debug("delta=%s", delta)
    if self.PROFILE:
        logger.debug("Global execution time: CPU %.3fms, GPU: %.3fms.", 1000.0 * (t2 - t1), 1000.0 * (t1 - t0))
        logger.debug("Compact operation took %.3fms", 1e-6 * (k1.profile.end - k1.profile.start))