Beispiel #1
0
def ldexp(significand, exponent, queue=None):
    """Return a new array of floating point values composed from the
    entries of `significand` and `exponent`, paired together as
    `result = significand * 2**exponent`.
    """
    result = significand._new_like_me()

    knl = elementwise.get_ldexp_kernel(significand.context)
    knl(queue or significand.queue, significand._global_size,
        significand._local_size, significand.data, exponent.data, result.data,
        significand.mem_size)

    return result
Beispiel #2
0
def ldexp(significand, exponent, queue=None):
    """Return a new array of floating point values composed from the
    entries of `significand` and `exponent`, paired together as
    `result = significand * 2**exponent`.
    """
    result = significand._new_like_me()

    knl = elementwise.get_ldexp_kernel(significand.context)
    knl(queue or significand.queue,
            significand._global_size, significand._local_size,
            significand.data, exponent.data, result.data,
            significand.mem_size)

    return result
Beispiel #3
0
def _ldexp(result, sig, exp):
    return elementwise.get_ldexp_kernel(result.context)
Beispiel #4
0
def _ldexp(result, sig, exp):
    return elementwise.get_ldexp_kernel(result.context)
Beispiel #5
0
def _ldexp(result, sig, exp):
    return elementwise.get_ldexp_kernel(result.context, result.dtype,
                                        sig.dtype, exp.dtype)
Beispiel #6
0
def _ldexp(result, sig, exp):
    return elementwise.get_ldexp_kernel(result.context, result.dtype,
                                        sig.dtype, exp.dtype)