Safe Early Stopping for Layered LDPC Decoding