{"id":24177888,"url":"https://github.com/heat1q/libldpc","last_synced_at":"2025-09-20T22:32:19.272Z","repository":{"id":159361852,"uuid":"185660633","full_name":"heat1q/libldpc","owner":"heat1q","description":"Fast C++17 Simulation Tool for LDPC Codes with Multithreading Support","archived":false,"fork":false,"pushed_at":"2021-08-19T22:15:32.000Z","size":44186,"stargazers_count":5,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T16:11:15.456Z","etag":null,"topics":["decoding","error-correcting-codes","forward-error-correction","ldpc","parallel","simulation","simulator","sum-product-algorithm"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/heat1q.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-05-08T18:36:49.000Z","updated_at":"2025-02-25T02:09:38.000Z","dependencies_parsed_at":"2023-06-12T06:00:17.884Z","dependency_job_id":null,"html_url":"https://github.com/heat1q/libldpc","commit_stats":{"total_commits":232,"total_committers":5,"mean_commits":46.4,"dds":0.1293103448275862,"last_synced_commit":"d2ec2d369dd4f4c5cad33caa8e416280d048a89c"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/heat1q/libldpc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heat1q%2Flibldpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heat1q%2Flibldpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heat1q%2Flibldpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heat1q%2Flibldpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heat1q","download_url":"https://codeload.github.com/heat1q/libldpc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heat1q%2Flibldpc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276169396,"owners_count":25596952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-20T02:00:10.207Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["decoding","error-correcting-codes","forward-error-correction","ldpc","parallel","simulation","simulator","sum-product-algorithm"],"created_at":"2025-01-13T04:16:55.644Z","updated_at":"2025-09-20T22:32:16.284Z","avatar_url":"https://github.com/heat1q.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LDPC Code Simulation\n\n![Build Status](https://github.com/heat1q/libldpc/workflows/Build/badge.svg)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n### Requirements\n* CMake Version 3.10\n* C++17 \n\n### Getting Started\nBuilding the binary:\n\n```\n$ cmake .\n$ cmake --build . --target TARGET\n```\nwhere the target can be the following:\n* `--target ldpcsim` produces an executeable containing the simulator, which is used by e.g. the commandline. See **Running the Simulator**.\n\n* `--target ldpc` produces a shared library containing the simulator for external usage. See **Python Wrapper**.\n\n### Running the Simulator\nAfter successful build the simulator can be executed. Note the usage:\n```\n$ ./ldpcsim --help\nUsage: ldpc [options] codefile output-file snr-range \n\nPositional arguments:\ncodefile                LDPC parity-check matrix file containing all non-zero entries.\noutput-file             Results output file.\nsnr-range               {MIN} {MAX} {STEP}\n\nOptional arguments:\n-h --help               shows help message and exits\n-v --version            prints version information and exits\n-G --gen-matrix         Generator matrix file.\n-i --num-iterations     Number of iterations for decoding. (Default: 50)\n-s --seed               RNG seed. (Default: 0)\n-t --num-threads        Number of frames to be decoded in parallel. (Default: 1)\n--channel               Specifies channel: \"AWGN\", \"BSC\", \"BEC\" (Default: AWGN)\n--decoding              Specifies decoding algorithm: \"BP\", \"BP_MS\" (Default: BP)\n--max-frames            Limit number of decoded frames.\n--frame-error-count     Maximum frame errors for given simulation point.\n--no-early-term         Disable early termination for decoding.\n```\n\n### Code File Format\nThe code file lists the the non-zero entries of the matrix line-by-line, \nwhere the left number refers to the row index and the right to the column index. For example, the matrix \n```\n0 0 1 0\n0 1 0 0\n0 0 0 1\n1 1 1 0\n```\nis represented as\n```\n0 2\n1 1\n2 3\n3 0\n3 1\n3 2\n```\nOptionally, a puncturing (or shortening) patter may be specified a the top of the file:\n\n*Puncture 2 bits associated with column index 1 and 3*\n```\npuncture [2]: 1 3 \n```\nA sample `k=128`, `n=1024` LDPC code with parity-check matrix `h.txt` and generator matrix `g.txt` can be found in `tests/code/`.\n\n\n### Python Wrapper\nThe simulator may be used as Python Module in a threaded application.\n```\nfrom pyLDPC import ldpc\n\n# initialize with codefile \u0026 simfile\ncode = ldpc.LDPC(\"doc/exmp_code.txt\")\n\n# simulate AWGN with 100 iters and MinSum decoding\ncode.simulate(snr=[0, 6, 0.2], iterations=100, decoding=\"BP_MS\")\n\n# stop the simulation\ncode.stop_simulation()\n\n# retrieve the results\nprint(code.get_results())\n```\n\n### Contributing\nIf you found a bug or have any suggestions or improvements, feel free to start a discussion or submit a PR!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheat1q%2Flibldpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheat1q%2Flibldpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheat1q%2Flibldpc/lists"}