loopy/statistics.py
def sum_mem_access_to_bytes(m):
    """Sum the mapping returned by :func:`get_gmem_access_poly` to a mapping

    **{(** :class:`string` **,** :class:`string` **)**
    **:** :class:`islpy.PwQPolynomial` **}**

    i.e., aggregate the transfer numbers for all types into a single byte count.
    """

    result = {}
    for (dtype, kind, direction), v in m.items():
        new_key = (kind, direction)
        bytes_transferred = int(dtype.itemsize) * v
        if new_key in result:
            result[new_key] += bytes_transferred
        else:
            result[new_key] = bytes_transferred

    return result
Sum the mapping returned by :func:`get_gmem_access_poly` to a mapping

    **{(** :class:`string` **,** :class:`string` **)**
    **:** :class:`islpy.PwQPolynomial` **}**

    i.e., aggregate the transfer numbers for all types into a single byte count.
    


i.e., aggregate the transfer numbers for all types into a single byte count.
i . e . aggregate the transfer numbers for all types into a single byte count .
def sum_mem_access_to_bytes(m):
    result = {}
    for (dtype, kind, direction), v in m.items():
        new_key = (kind, direction)
        bytes_transferred = int(dtype.itemsize) * v
        if new_key in result:
            result[new_key] += bytes_transferred
        else:
            result[new_key] = bytes_transferred
    return result
def sum_mem_access_to_bytes ( m ) : result = { } for ( dtype , kind , direction ) , v in m . items ( ) : new_key = ( kind , direction ) bytes_transferred = int ( dtype . itemsize ) * v if new_key in result : result [ new_key ] += bytes_transferred else : result [ new_key ] = bytes_transferred return result
Sum the mapping returned by :func:`get_gmem_access_poly` to a mapping
{(** :class:`string` **,** :class:`string` **)
:** :class:`islpy.PwQPolynomial` **}
Sum the mapping returned by : func : ` get_gmem_access_poly ` to a mapping { ( ** : class : ` string ` ** ** : class : ` string ` ** ) : ** : class : ` islpy . PwQPolynomial ` ** }
"""Sum the mapping returned by :func:`get_gmem_access_poly` to a mapping

    **{(** :class:`string` **,** :class:`string` **)**
    **:** :class:`islpy.PwQPolynomial` **}**

    i.e., aggregate the transfer numbers for all types into a single byte count.
    """
m