Revision 1.102 by

Revision 1.103 by

… | … | ||
---|---|---|---|

759 | =item uint_fast64_t ecb_gray64_encode (uint_fast64_t b) | 759 | =item uint_fast64_t ecb_gray64_encode (uint_fast64_t b) |

760 | 760 | ||

761 | Encode an unsigned into its corresponding (reflective) gray code - the | 761 | Encode an unsigned into its corresponding (reflective) gray code - the |

762 | kind of gray code meant when just talking about "gray code". These | 762 | kind of gray code meant when just talking about "gray code". These |

763 | functions are very fast and all have identical implementation, so there is | 763 | functions are very fast and all have identical implementation, so there is |

764 | no need to use a smaller type, as long as your cpu can handle it natively. | 764 | no need to use a smaller type, as long as your CPU can handle it natively. |

765 | 765 | ||

766 | =item T ecb_gray_encode (T b) [C++] | 766 | =item T ecb_gray_encode (T b) [C++] |

767 | 767 | ||

768 | Overloaded C++ version of the above, for C<uint{8,16,32,64}_t>. | 768 | Overloaded C++ version of the above, for C<uint{8,16,32,64}_t>. |

769 | 769 | ||

… | … | ||

773 | 773 | ||

774 | =item uint_fast32_t ecb_gray32_decode (uint_fast32_t b) | 774 | =item uint_fast32_t ecb_gray32_decode (uint_fast32_t b) |

775 | 775 | ||

776 | =item uint_fast64_t ecb_gray64_decode (uint_fast64_t b) | 776 | =item uint_fast64_t ecb_gray64_decode (uint_fast64_t b) |

777 | 777 | ||

778 | Decode a gray code bakc into linear index form (the reverse of | 778 | Decode a gray code back into linear index form (the reverse of |

779 | C<ecb_gray*_encode>. Unlike the enode functions, the decode functions | 779 | C<ecb_gray*_encode>. Unlike the encode functions, the decode functions |

780 | have higher time complexity for larger types, so it cna pay off to use a | 780 | have higher time complexity for larger types, so it can pay off to use a |

781 | smaller type here. | 781 | smaller type here. |

782 | 782 | ||

783 | =item T ecb_gray_decode (T b) [C++] | 783 | =item T ecb_gray_decode (T b) [C++] |

784 | 784 | ||

785 | Overloaded C++ version of the above, for C<uint{8,16,32,64}_t>. | 785 | Overloaded C++ version of the above, for C<uint{8,16,32,64}_t>. |

– |
Removed lines |

+ |
Added lines |

< |
Changed lines |

> |
Changed lines |