From dafcf45070a1e1dd26994cec3132f8a4f192b3e0 Mon Sep 17 00:00:00 2001 From: Yunsong Wang Date: Fri, 18 Oct 2024 10:14:50 -0700 Subject: [PATCH] Add pre-commit hook checking example links (#620) Replace #613 This PR introduces a pre-commit hook that automatically verifies and updates the Godbolt links in the `README` when there are discrepancies between the example files and their associated links. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 15 ++- README.md | 28 +++--- ci/pre-commit/example_links.py | 178 +++++++++++++++++++++++++++++++++ 3 files changed, 204 insertions(+), 17 deletions(-) create mode 100755 ci/pre-commit/example_links.py diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 676988ec0..588736bfe 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,14 +17,25 @@ repos: args: ['-fallback-style=none', '-style=file', '-i'] - repo: local hooks: - - id: doxygen-check - name: doxygen-check + - id: check-doxygen + name: check-doxygen entry: ./ci/pre-commit/doxygen.sh files: ^include/ types_or: [file] language: system pass_filenames: false verbose: true + - id: check-example-links + name: check-example-links + entry: ./ci/pre-commit/example_links.py + files: ^examples/ + types: [cuda] + language: python + pass_filenames: false + verbose: true + additional_dependencies: + - --extra-index-url=https://pypi.anaconda.org/rapidsai-wheels-nightly/simple + - gitpython default_language_version: python: python3 diff --git a/README.md b/README.md index bc50aae02..c0f674bae 100644 --- a/README.md +++ b/README.md @@ -204,28 +204,28 @@ We plan to add many GPU-accelerated, concurrent data structures to `cuCollection `cuco::static_set` is a fixed-size container that stores unique elements in no particular order. See the Doxygen documentation in `static_set.cuh` for more detailed information. #### Examples: -- [Host-bulk APIs](https://github.com/NVIDIA/cuCollections/blob/dev/examples/static_set/host_bulk_example.cu) (see [live example in godbolt](https://godbolt.org/z/96re4zhjo)) -- [Device-ref APIs for individual operations](https://github.com/NVIDIA/cuCollections/blob/dev/examples/static_set/device_ref_example.cu) (see [live example in godbolt](https://godbolt.org/z/7aKWdGTfx)) -- [One single storage for multiple sets](https://github.com/NVIDIA/cuCollections/blob/dev/examples/static_set/device_subsets_example.cu) (see [live example in godbolt](https://godbolt.org/z/7f9KW44P4)) -- [Using shared memory as storage](https://github.com/NVIDIA/cuCollections/blob/dev/examples/static_set/shared_memory_example.cu) (see [live example in godbolt](https://godbolt.org/z/Ws5c71T4z)) -- [Using set as mapping table to handle large keys or indeterministic sentinels](https://github.com/NVIDIA/cuCollections/blob/dev/examples/static_set/mapping_table_example.cu) (see [live example in godbolt](https://godbolt.org/z/KfYo4nMss)) +- [Host-bulk APIs](https://github.com/NVIDIA/cuCollections/blob/dev/examples/static_set/host_bulk_example.cu) (see [live example in godbolt](https://godbolt.org/clientstate/eJx9VgtvGzcM_ivcDcOc9vwKVhRwkmJekmJGC6eI0xbDPDiyTvYJkaWbHnY9I_99pHTnx9ouAWyfSJEfP_LTaZc54Zw02mWDP3eZLLJBP88U08vAliIbZDwULMszZ4Ll9Nx9MdXwAq5NtbVyWXpo8TM4752ft_HjlxzGn0Y3oyFc391_uLsfPozuxh3aEDe9l1xoJwoIuhAWfClgWDGOX7Ulh0_CEho47_SgRQ7TrLZNs7OLGGVrAqzYFrTxEJzAMNLBQioB4gsXlQepgZtVpSTTXMBG-jKmquNEOPBHHcTMPUN_hjsqfFocewLze-j0V3pfDbrdzWbTYRF2x9hlVyVn130_ur4dT27bCH2_7aNWSC9Y8XeQFgufb4FViIyzOeJVbAPGAltagTZvCPnGSi_1MgdnFn7DrIhxCum8lfPgT8hrcGL9xw5IH9NI3HACo8k0g9-Gk9Ekj3E-jx5-v_v4AJ-H9_fD8cPodgJ399is8c2IWoVPb2E4_gPejcY3OQikDlOJL5WlKhCqJFpFkTicCHECY2ESLFcJLheSQzNGsDRrYTWWBZWwK5kGDkEWMY6SK-mZj2tfFRdTdad6qn-UmqtQCLjkgZuuoy185oTv8FC-OfXwpQ3OdwuxxiizteDe2A45feWyCJpTaqa-bVdmid36jtFhXwUOWee_-aXBdgi2OtkU63TRs_sizcevcW5L9J7Ng3qaiS8MGRZYUTLPrRQLuBEr5MZb5gUy5IjRelIPJGC_KQK2m6LB8MPIHYT3gK5kjcuAQ4UzorY4bmuTJnFhzSoGjJuxMdEpkFapq4Wh3hlsXt0mJZ8EPErsj_WPOBgxyyM3mtTkHuMIAqFCnE9ie4CCnZTao_Skbq2NLM6meofrmIoyvBNbuEJY_oJIAuh24XZV-S04ZXwCbgUNo9A-qYl-2zX-nma0KLVQSMGaqSBch-rGuUxP4EoTFG5C1oTCicBNLvCyzuNL5okBPFcEDisYzoMlQeJxQ99V8FAwz6iSiJNTS0gaIAjiDMucNRCwiHb_UMM4rOYUMnFBQkcQiTxBEsA2FoOBk_-ImT-Kq8NqFjdcwavez71e7xDxGs831DpwOogkEjRnrlY--v4EyjDsHKOxpx0sYM5DYLLOkhVj9zqvLr4J4hD9Khm5kKq1R9U9jnN2jI1mNXBqWJyBeAIju0owDPrYRH2su5pa3-4Dc3EEI52JqYbPSDqpHgHuJ_4Su_CGEuyaiHnts2_I7uvWPD8fIUWJIomEMul436JdL4d-Duc5dDo5yGfakDQ_GJwcKgkE7dkTE19Te-8mdCvKYC6WOPhneRKF0AX97h2RN4pTgcwplZCgGExSJnMlVRtbhYdemp_vhj2KOUGcdGaQklEvQfnvlzM3Rr1BTzyHTwpqGCsFfwK5OOAjTda6xwFEvcRj6QCzORP-p_6YrTEdJcO7gFxskzL3-Uq2xrNMCJ22kSthricW3SLkWTTi3DZVksEsWiepmsw1jMZVFjQqfpu4OCDCqlun8c9gVwvD4OlweYmH0CRwju_KH-BtBNDA7kwxRnYBzymUFT5YDSRoXMHrFd1X8E1gD7ewTK8575-_Cn00m8qnK1rWxnxX_OXL_mtoM8vLK7eave5Bu43C9vjhsRhRtBVbzeO9Tcn5UUzOucLFdbpk4QLqVD9lz3ljR_mc2HE4sue_4v-_fg9_jw==)) +- [Device-ref APIs for individual operations](https://github.com/NVIDIA/cuCollections/blob/dev/examples/static_set/device_ref_example.cu) (see [live example in godbolt](https://godbolt.org/clientstate/eJztWH9v4zYS_SpzOhzO2cg_EnTbwpsE50u2OKOFUyTZFkVdqDRF2bzIok6k7PiCfPe-ISXL3uwWLXB_XgIklmY482bmcTj0c2SVtdoUNhr__BzpNBqfxVEuimUtlioaR7JORRRH1tSV5Ofhm3lBb-jalLtKL1eOevKEzkfn5338-SKm2Q_Tm-mErm_vvr-9mzxMb2cDXuAXfaelKqxKqS5SVZFbKZqUQuJfI4npB1UxGjofjKjHCvOokc2jk3feys7UtBY7Koyj2iqY0ZYynStST1KVjnRB0qzLXItCKtpqt_KuGjseDv3UGDELJ6AvsKLEU3aoScLtofPPyrlyPBxut9uB8LAHploO86Bsh99Nr9_P7t_3AX2_7EORI71Uqf_UukLgix2JEsikWABvLrZkKhLLSkHmDCPfVtrpYhmTNZnbikp5O6m2rtKL2h0lr8WJ-A8VkD5RIHGTe5rezyP65-R-eh97Oz9OH_51--GBfpzc3U1mD9P393R7h2LNbqZcKjx9Q5PZT_TtdHYTk0Lq4Eo9lRVHAaia06rSkMN7pY5gZCbAsqWSOtOSWhrR0mxUVSAsKlW11oFwAJl6O7leayecf_cqOO9qOC_mxV91IfM6VXQha2mGlpfIxCo3kPXq6ljDraraumGqNrCSbJR0phqw0iuVrC4kuxb5p-W5WaJanxFa1FWBZIOP_UtjECkAblSyrExd2tcq1qWpyo7MaoMqKrH2qsM3gUP_8NxuQqlUpip2magngWIoBB-0FpVWGd2oNdLo4FohmZaT35C6y1djq281fE6-n9puhx4olZXZQAFlwk4r-mbr67f3T9uVliuSYNpC8T5sCOwQtnR-13mL7FqagncZCptVZu1lYHpAAWF6UOThEDasqhzcMgqAf1Q7y4YNXq2EXfn3tWU0puD1-1STT7XnocL-JCfs4xyIkCfkA1XblaoQawXmujuVxbR_MS3K2k0ZO4iC7CfJMjcLkScJbYxOSaLaZp0cljXA7AVTjCk-tuJxYxu7dDy2-r8qcVSczItnhErs06KFAP2SLuk1W95xLogTZx1vPxI14pfLhC1hRfA6Hj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_bAt9PUoI_yfZUvfwgMVgk4Zbg_MdjACtb0enxfykV5zJIQ_kfcOGZFq_QRLzoixKGSreCgkLh562zXVqCpJWJRCEkVYRmrHhyUUPNGEy9Et2sZxAKT9Y5ctZ6bbduq4pRDa3G7wLOD2QGn6bF9PkRDOzWo1MUFmuF9LSVupn-hbzyAFvZgDhuRP1fZVKVcXRXExwDeRHHE3w7goK667zyiYiPl2fnb-gxiU7rwhUjUh79LeXp69hX1RSVXl3adfDWifh_HgcMfh2BU2s_FeuG_Jcn14sCmlDLHy034SgMv0N2Lx-glbuUo2ZEcGy96-cX__gbvsxSQ)) +- [One single storage for multiple sets](https://github.com/NVIDIA/cuCollections/blob/dev/examples/static_set/device_subsets_example.cu) (see [live example in godbolt](https://godbolt.org/clientstate/eJzNWQ1P20ga_ivv5qRTgJAA3V67gaDlgPairaAHdFerpfJO7EkyV8fOztgJWcR_v-edD8cmadVKe9IFhRB75v143uf9GPPYMtIYlWem1f_tsaWSVv-w00pFNinFRLb6rbhMRKvTMnmpY_7e273PaJfO8_lKq8m0oHa8Q0cHRy_28ev7Dl39PLwYntH59c3765uzu-H1VZc32E3vVCwzIxMqs0RqKqaSzuYixoe_06GfpWZr6Kh7QG1ecN_y9-5bO8dWyiovaSZWlOUFlUZCjDI0Vqkk-RDLeUEqozifzVMlsljSUhVTq8rLsebQr15IPioE1gvsmOPbuL6SRFGZzq9pUcz7vd5yuewKa3Y315Ne6hab3rvh-eXV7eU-TK-2fchSwEta_lEqDcdHKxJzWBaLEexNxZJyTWKiJe4VOVu-1KpQ2aRDJh8XS6GllZMoU2g1KosGeMFO-F9fAPhEBuDObml4e9-if57dDm87Vs4vw7t_XX-4o1_Obm7Oru6Gl7d0fYNgXV0MOVT49obOrn6ln4ZXFx2SgA6q5MNcsxcwVTGsMnEY3krZMGOcO7PMXMZqrGIKNKJJvpA6g1s0l3qmHOFgZGLlpGqmClHYaxvOWVW9--w--5vK4rRMJJ3EZZz3DG-JIyOLSMtxNy6np1vW5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HgHE-vvFs_f3z94vG--negpjQlJJUO20umdKdbWnbceG2uKuH7_aMKiRDm5HPSOw4pj29lRFjroYfnCBGhiNBKpUmGn9MB8LUzTNcKVhJj7JyB9D5APO88VJNdW262AyjXcqIvPH5xwEAcYcfXYHxQsz6UGt-GDuHKsHxGlmnyrlM8yEMmyxU1aRFyJlTz2ZnHWmUulR8WfyyFgOHRyvUastqkFXR4p_Iw4NJOvy9gb15XDdlwdv5m-K_fpoD0zVpjo0PApv94KT1x4cQWE3KxOHKxTfCgdm6_OOxRIjSIyCrEFY37Uhr6F87p7WbX-AVRr_fBrp7jO1UmXj7dcNGifIxw39TyFthxkaJ_D60z_xCgKqB_ITdGJMHeFowZFc68FEFLa3N48Awak62yqGVoPA2nP_nLLm15dIsZFPG-fp2oXHJic6DSe49rZ3wIuKIx-fPGuCkdsTNGh6dAlZIbA-4z5uovLUocfau2bkUyNHw8G58Yi7hl_VE001b2yOw7Wjjm1W9urJyQmfNo9en56ettdiPA7diSxqR4Y36nl3CcK4FX-tKF6vZVHqzKY7XGx1WlxB0Mn1-r9arWwRx4dHL8tD3OZnyvZfXq19UGAQ7-0dvqJ9oePpwMyiVwe0v4--Uezb2pfIZD8Vs5H9P1iqRjWZcRynuLhw_7TCBUzU2afWUyfcR_Aa94F46-mj_fkvXfg-3w==)) +- [Using shared memory as storage](https://github.com/NVIDIA/cuCollections/blob/dev/examples/static_set/shared_memory_example.cu) (see [live example in godbolt](https://godbolt.org/clientstate/eJyVWA1vG7kR_SvEFgXknCzZQYsrFFmoznZRIal9sJ0Eh_NhTe1SEuvVUkdypegM__e-GXK1KzluXQdxIn7MDN88vhnqKXHKOW1Klwx-fUp0ngxOu0khy3kl5yoZJFmVy6SbOFPZjD73392X4p04N6ut1fOFF53sSLw_ef-Xrrj6MrmYjMX59c3P1zfju8n1VY_W8vpPOlOlU7moylxZ4RdKjFcywz9xpiu-KEuBiPe9E9GhBfdJnLtPjj6wla2pxFJuRWm8qJyCGe3ETBdKqG-ZW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HA_rUPTkotOtkaloNBvXssEXYc-BA-mmcItuNYNApIZlrdJdcGyyEHAoSq-nuyrKO7h2zafA0db7URnBjDH4oR6_93d4O3d4jro-Q58oG0yVgx0PcNgUYPtCrxbfO6xIaFuxuDzUw6d7UsA3RqNO6KU_PrZr5SeIEi3ZiQkMsCGbSvvoxsWviDx7C-36Gw-EphOr930aj0eFb6TsP1w-hGuXyAtUqU63ujLsqFNakm0QZts3XX0m5zrLT93-tTjFtVj58N5YcO5-fZT_8cPqjOJY2W5y5ZfrjiTg-BnD-mMPIVX5cyOWUvzAr9LRlM8uyAoPr8BUXBvCSLB-T5249D6D35nO1Tp5_4z__AbR8tYo=)) +- [Using set as mapping table to handle large keys or indeterministic sentinels](https://github.com/NVIDIA/cuCollections/blob/dev/examples/static_set/mapping_table_example.cu) (see [live example in godbolt](https://godbolt.org/clientstate/eJy1WQ1v20YS_SsDHe4iJZRkKck1UGyjOqdFjRb2IXZaFLYhr8iVRITkqsulFJ3g_35vZknqw3KdHnIOHIvk7OybmTcfS60buc7z2GR5Y3CzbsRRY9ALGonKpoWa6sagERaRagSN3BQ25Ovuy9uMXtKZma9sPJ05aoYt6h_13wR08ev5h_MhnV1-_Pflx-H1-eVFh2VF_pc41FmuIyqySFtyM03DuQrxp3wS0K_aMhDqd46oyQK3jfLZbaP1XrSsTEGpWlFmHBW5hpo4p0mcaNJfQj13FGcUmnSexCoLNS1jN5OtSj0Ch34vlZixU5BXWDHH1WRbkpSrofPPzLn5oNtdLpcdJbA7xk67iRfOu7-cn_1wcfVDG9DrZZ-yBJ4lq_8oYgvDxytScyAL1Rh4E7UkY0lNrcYzZxj50sYuzqYB5Wbilspq0RPFubPxuHA7zqtwwv5tAbhPZXDc8IrOr24b9K_h1flVIHp-O7_-6fLTNf02_PhxeHF9_sMVXX5EsC4-nHOocPUjDS9-p5_PLz4EpOE6bKW_zC1bAagxu1VH3odXWu_AmBgPK5_rMJ7EIVUMoqlZaJvBLJprm8aeawAZiZ4kTmOnnN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TtKZKXBgF1CL8u3WcmaS6vBnVTbV5SacvNWri_K9yfCqzg89mcRhrKUZKH9YKpPeZPKmrMzoocD0eV3iqTJTDkdyYD6YOFgeijakEKqFPzj7c9LWIYl1bfbYDJJoLG41gndGtdoTavdKH27FhTWN5s7isXd3h_9rtjqokmWERJoPmlyadt9hrf0N_YV74bHwgUM7cqdrCfhL6j8E3p1jrgJvj_5OiVEReMRhfoJ_W0QU7ZUt68dWPcnh-qc6k6wrS59f4rdNoF_ZEb87QCSPe8FmIhJ6nq53rzcbPDzJ1Xz_HP22ntT34uLXjGTNyRNJUgf-dH0UEAD2kYDIP598_D7WH-ibW8o6Y41-0OT3d1s3cS5ttlrb7Ciy-I9C-_03P88jaXLcW_vZv6VthL2gh9FhXMOAtdAjnFmaWyIVxkdqsiLdCdSJ7xH8yp1f0x3SEezvXVm5N0MhTta_5fDzAm8lD-SFPnLRlTWiitegGhdIxtKmwIwB6eg9_oiC9_TqVdzaGnQ_lgb7t1mEzVnj_isHL-7nP1_7brZsuInvNiMs_ymH3iM_uTSCBvfuONF28x1SI1uEYa__tujhsZk7_wVTow0fnISvXvW-o7ay4ewkT0ffHVG7jRLi2pLUkY7aiUrH8q1TEo-3dIZhmODmwn9PhBvoOtnnxkNQPUcW7TwHZRoPd_Lvv3bzBxQ=)) ### `static_map` `cuco::static_map` is a fixed-size hash table using open addressing with linear probing. See the Doxygen documentation in `static_map.cuh` for more detailed information. #### Examples: -- [Host-bulk APIs](https://github.com/NVIDIA/cuCollections/blob/dev/examples/static_map/host_bulk_example.cu) (see [live example in godbolt](https://godbolt.org/z/ndccPsj11)) -- [Device-ref APIs for individual operations](https://github.com/NVIDIA/cuCollections/blob/dev/examples/static_map/device_ref_example.cu) (see [live example in godbolt](https://godbolt.org/z/e9j5o6f5M)) -- [Custom data types, key equality operators and hash functions](https://github.com/NVIDIA/cuCollections/blob/dev/examples/static_map/custom_type_example.cu) (see [live example in godbolt](https://godbolt.org/z/xx74Knn3r)) -- [Key histogram](https://github.com/NVIDIA/cuCollections/blob/dev/examples/static_map/count_by_key_example.cu) (see [live example in godbolt](https://godbolt.org/z/fz7q1vav6)) +- [Host-bulk APIs](https://github.com/NVIDIA/cuCollections/blob/dev/examples/static_map/host_bulk_example.cu) (see [live example in godbolt](https://godbolt.org/clientstate/eJyNV4Fu2kgQ_ZU5n06F1mCIrqpEQnVckupQK1KFtFVVKrKsF1jF9rq7a1KK-Peb2bXBTtFdEwnw7sybtzNvxvYuMMIYqTITDL7sAhkHg34YJCxbFWwlgkHAi5gFYWBUoTldR89nGTyHS5VvtVytLbR4G856Z70OfvwZwuTj-Go8gsub2_c3t6O78c2kSw7O6Z3kIjMihiKLhQa7FjDKGcevcieEj0ITGzjr9qBFBrOg3JsF7XOHslUFpGwLmbJQGIEw0sBSJgLEdy5yCzIDrtI8kSzjAh6lXbtQJY6jA59LELWwDO0ZeuR4taxbArMH6vS3tjYfRNHj42OXOdpdpVdR4o1N9G58eT2ZXneQ-sHtQ5ZgekGLb4XUePDFFliOzDhbIN-EPYLSwFZa4J5VxPxRSyuzVQhGLe0j08LhxNJYLReFbSSv4onnrxtg-liGiRtNYTydBfD3aDqehg7n0_jun5sPd_BpdHs7mtyNr6dwc4vFmlyNqVR49QZGk8_wdjy5CkFg6jCU-J5rOgVSlZRWEfscToVo0FgqT8vkgsul5FDJCFZqI3SGx4Jc6FR6wSHJ2OEkMpWWWbf20-FcqGiWzbLfZcaTIhZwwQuuIkMufJ6yvMuL9eumhV3rwtgoFhtEmW8Et0p3yegnE6wMS05vSSs0Q8foh8zn1cVpU4MwAtV2etdqlhnMTtp9ypOnzDZduLFxLJaNNamwuIKljUWXNePwoudebX-5Llij9XxRJA9z8Z1hvQTmx28vtBRLuBIpZho5WYH5NlSfUvfHlKJ6CAHFQ2gwej82xza-Q1PadcuAEkXFJVsU70Z5XS-1Sh2gc8YyO6OCOp80EitSgsopoa7oiXxAEWOxtUWRuRhLmXkhgxGW-D2I7ZGC04PMLLawzFobJeP2LNvhDgYh7Ldii_06REx7flz9yJJCHFZpPYrgOs3tFkyirD-KFiR2kVnfrfRbb_D3LKBFmYkEk7IhJNOlTKDu_RWYtSoSdMI8igQVh06m4Osyjl0zSznBuSWwGUBxXmhqeBxn9J0XFmJmGZ3R8edUJGo9EERxjgmYVxTcOBpCp-9O58_11N6xOnqU1iWbSZEuiITLa-RMIWdSG5pCi6oYgvoTVREPBkb-EHNbC5IVKVEyCPyy96zX6x3BL3H44iACTlNSYnYXzJRjCW3_gEQxFAKjniQPVmDMIzDtzv0uYve6L89PkjiiD_0mFzJpHVhFdZx2nRtJv-BUbSChu9vDLKjQsLheC14ynb6TL30Zp2iX21rSqvw6bfqjEOoQaEYh40NHOXXCgXVYGhxqu_u5yvumkQu4O1Xc_b52QBwUmHvqGz-SquZxBymlutv1wh7C7_phH7-63S7sZCj3ewLxQ2swaAzPC5Tk61IWLsOHVLu78sGpitqqmXYXYoVt2g7r_l2RxbTUa_o3gzplH8J68r8YuGzRp6HL5WZwVzYc8jmqdOjrVMGm7EHM6_O_1dixBc7X_zxrk0e7JsWxM8C6JEnZeziYlFMZ6oWM6N7mYVqeXVixfNFIJfVFqw49RaI012naLlVxKPz_ZtoZn0p0CfwGx7Jn7CSFMoJ-CGdOQnunMINoqDBmjOKS0RAsNecOd18PcF8lYolyRTy4J9C5VXOa_l_k13u8VQiTPbP4CILPN2HTHQ1gODw57e6r7BHQL0uxDn4o2PHs-Ggql1s_yCkDVKh6cjGg5f5RsxqftbQvlErKyYXOZZS5d3miOfdI0jrF5gnHkvdppZXE5RJaTwO2YVfOTIV3nYsLnH_TgnN8xvsN3rgT0flKvBniBOew93Ba2EJnQNMeV_DFgJ608alDH98fgmzDef_sZdHHbZVb_3IRdDDikL940X8FHab5emjS-asedDo49S1-WDyNiDsJSxfujSORixom5zzBxY1_PcAFHOLZQ7APq30clI19lHew_-r-_wWLXH6r)) +- [Device-ref APIs for individual operations](https://github.com/NVIDIA/cuCollections/blob/dev/examples/static_map/device_ref_example.cu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G5Eu3I6ia6UwXi05g7G8DwIVaEdq0umUK0Wrenmv9EnEDE0h4iNulVomf8RFb8h0Cr6D0hYo1kFfAjd7_JtFN8nV6108ga_j-DXHVWrXokYy8_Kb78L6XdW-ODTeVsdaMpgqgAZtaZke7J24xDu2zDELrYWe59oeUDp9liMKdvybyb-ie5iZLSRNKbmpWrKO1pp1C477rHk4OOni35XUesLr2WK9nfw23ODd6gucG79qz3XGqdcnahYIZrPRud9t8tp0l4cV4vViFIHBIY3qw6Vn71EcG2vbr4TNzIHlfryOKfLL4rU9txGt7Cg2Tut7mecjCN7udLzevRmFUNv3rwv7iXrIBg_f1GOsZxmxr5M7p1AjmlwfDz-QZzIPFhNi9j_YSROTlCIDP6zr09OIhnP-Q1zpOctmkEQRHi4tq-D8QDOSz737r1qHVmhsw6L9-4_8r__AjWPYDc=)) +- [Custom data types, key equality operators and hash functions](https://github.com/NVIDIA/cuCollections/blob/dev/examples/static_map/custom_type_example.cu) (see [live example in godbolt](https://godbolt.org/clientstate/eJytVwtv2zYQ_is3DdvkVpbtbEMLxw7gJS1mrHCGOG1R1IVCU7RNRCI1kbKTGf7vO5KSLT_apMAcIIl55PG7u-8eXHuKKcWlUF7389rjsdftBF5CxLwgc-Z1PVrExAs8JYucmu-tFxMBL-BSZo85ny80-LQBZ-2zThN__RbA6MPwajiAy-ubv69vBrfD61FoDthD7zhlQrEYChGzHPSCwSAjFP-UkgA-sNyggbOwDb7ZMPFK2cRrnFstj7KAlDyCkBoKxVANVzDjCQP2QFmmgQugMs0STgRlsOJ6Ya8q9Vg48KlUIqea4H6CJzL8NqvvBKK30M1noXXWbbVWq1VILOxQ5vNW4jar1rvh5ZvR-E0ToW-PvRcJuhdy9k_BczR8-ggkQ2SUTBFvQlYgcyDznKFMS4N8lXPNxTwAJWd6RXJm9cRc6ZxPC73nvAon2l_fgO4jAh03GMNwPPHgj8F4OA6sno_D2z-v39_Cx8HNzWB0O3wzhusbDNboamhChd_ewmD0Cf4ajq4CYOg6vI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iK3XnXzHc57VaNa7BunUjZE4n93Sn91OebKb-XkLucfurzZM4fJno9oysL9-a2nulHF6bomjGexf4pd18xbaZOge6eAQbQxnrP8xhXAVMzweL8uc8JRVJWZ0RFhVJ3NWMCUXDndN6FMMR7bJu9q4XyM_9yB7FkSvyCDeIBB_YA7rbIUWra3Ywkit2FFb9KsfJreoI9ftQYFuz8EFr6-dZ5FueteSTZsjQjPIHYzFyGaKZdIRLMWje0GBO380FYHv6_kJTqBtviWLkfnzm7EwetFAMWbWWH6WCEcuYf3VYHwERsFk6QrxxIpjUOTg3l3IA5A3_vbrPLFl5MLw29Hr6wxgWl-DL6Ad5a4hhu2TKowgla652bmcXoKpWb4QNX8Dlt3qf4Ys13r25PLCntnP1edFAsM-2e5F4Tb-zTly87r6BJcrroqzR61YZmE0cd3bTtIGZxMyHp1L7TEz6t6aSUJri4dI9qXMB-KO69TVDJsaDuydE_3uaL_fkPoxeK0w==)) +- [Key histogram](https://github.com/NVIDIA/cuCollections/blob/dev/examples/static_map/count_by_key_example.cu) (see [live example in godbolt](https://godbolt.org/clientstate/eJyVWQtPI0cS_it9PkVnL34AySYng60lQC5WchABmygCNGnPtO0W83BmejAO4r_fV9XTM21jlhwrsXY_qqrr8dXXzXOrUEWhs7RoDW-fWzpqDQ-6rVim81LOVWvYCstItrqtIivzkL4PPtyl4oM4zZbrXM8XRrTDjjjcP_y6h1_fdMXFr5OzyYk4vbz65fLq5GZyedGnDbzpZx2qtFCRKNNI5cIslDhZyhD_VTNd8avKyRpx2N8XbVpw16rm7lqdI5ayzkqRyLVIMyPKQkGMLsRMx0qop1AtjdCpCLNkGWuZhkqstFmwqkoOmyN-r4RkUyOxXmLHEt9m_kohTW06_SyMWQ4Hg9Vq1Zdsdj_L54PYLi4GP09Ozy-uz3swvd72OY3hXpGrP0ud4-DTtZBLWBbKKeyN5UpkuZDzXGHOZGT5KtdGp_OuKLKZWclcsZxIFybX09JsOM_ZifP7C-A-mcJxJ9dicn3XEt-fXE-uuyzn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hP5oAJuMCiswLFmm3_7ne7fX-ydq09I0O643f4M8922m7m9B-WpfBS0OTc0cBVlCkxIXxeERgY02TDYzobOkXjx8v0kBvqROyuM575SM4imG1l4ZDe_HTsH6uNt5tf2S-y0anUhPRhpINFUFtULDWroKzRJGYmZJIk7qoFmAztLjKn_sRE8sUyjMRqYRNygIOB8SLNVSikro0d6A-uKleIrMD2XUXJCiYzDkim7YxjORFtv0XBIQau5Ix2yVjESb_rcPzpdhMuQgLehbDsMpmYdqYL7gOePfu0Q2kzkhohaczV_9k16j6j7rnx3rdVUw_Lza4B--b9kMDA_7wLp9-W45EP54y5kMs7757-rP4YSmQfLPJuiQI-ZxdF4pGayjE0AwFgEsxL4obOURUP2SxPD_yiD4KVZ2kNC8atkUhp-usx3XX-5CYKNZatC_LFFtP9o3mochlZKALbslYbgP6icGrEX_8ASXHrsw6eKtG9pcGW3VUSW8lAyQ8Dhx2-PNtdYtsTT_DPyAGXP39wTBx2kezPCgvxr6XEzN7bxOT4-rsV3va3j8bjt7q874bC5gW7DS59YRLvjYcyVAskG6bCPbFRR9MoWxxYgEDvlcaDmSvFOWwIzogyp25Jnwu3-vW1Qu7dbquEE2EenN0XYiNoDBDC67eltvLEhyw37MLtQ4QPxz01MtNuqFwt65cE1LdyiHbWng5CFjLYdDlOJVXyhzXiozB1Q2UdLCkFlQfXyxk8wKteztccXiZXutszuqu1y3obcALTaZthOz2w7TOGei0HurousMEHgt1mPTVqV3iW3ary2ScILr8CeFtU9li4AW-5s3h3tAHVz7i4YNKgPcKZre_n7xx2EtI7cPbHSTBwTI61ui26NOlZ584eqVvoYhgeHH8sDTGdLY_-K1epB_ijc2zv4TvToSjHie4To9QAHBr_s02svlsmU_7QV66knMwzDGIOP9u9QGEAPSx9aL103D-jZmIcfWy_3_O9_9qthSw==)) ### `static_multimap` `cuco::static_multimap` is a fixed-size hash table that supports storing equivalent keys. It uses double hashing by default and supports switching to linear probing. See the Doxygen documentation in `static_multimap.cuh` for more detailed information. #### Examples: -- [Host-bulk APIs](https://github.com/NVIDIA/cuCollections/blob/dev/examples/static_multimap/host_bulk_example.cu) (see [live example in godbolt](https://godbolt.org/z/aq8jz8G9e)) +- [Host-bulk APIs](https://github.com/NVIDIA/cuCollections/blob/dev/examples/static_multimap/host_bulk_example.cu) (see [live example in godbolt](https://godbolt.org/clientstate/eJylVgtv2zYQ_isHDUXtVJYfaFDEjQN4bYoZK5whTlsUcaHQFG0TkUmNpOx6hv_77ijJlpsM67AWiCHe-7vvjtwFVlgrtbJB_34XyCTod8MgZWqRs4UI-gHPExaEgdW54fTdPpsqOIN3OtsauVg6aPAm9Dq9bgv_vA5h_Hn0fjSEdze3f9zcDu9GN-OIDLzRR8mFsiKBXCXCgFsKGGaM408pCeGzMJQN9KIONEhhGpSyadB8671sdQ4rtgWlHeRWoBtpYS5TAeI7F5kDqYDrVZZKpriAjXRLH6r049OBr6UTPXMM9RlaZPg1r2sCc4fU6d_Suazfbm82m4j5tCNtFu20ULbtj6N31-PJdQtTP5h9UinCC0b8mUuDhc-2wDLMjLMZ5puyDWgDbGEEypymzDdGOqkWIVg9dxtmhPeTSOuMnOXuBLwqT6y_roDwMYXADScwmkwD-HU4GU1C7-fL6O63m0938GV4ezsc342uJ3Bzi80avx9Rq_DrAwzHX-H30fh9CAKhw1Die2aoCkxVEqwiKTCcCHGSxlwXadlMcDmXHCoawUKvhVFYFmTCrGRBOEwy8X5SuZKOOX_2pDgfqj1VU_WLVDzNEwGXPOe6bcmEx6s8dXLFsojny6tTNbc0uXXtRKzRVbwW3GkTkdITFemEYShtc50rgj-uTp7Xt9hPgeR6XuoMUxbBWEU_ZuQrtf5QKocElKqx1jJpTtUO60Q6E0aPYhu7bSaQcgOkhHt7FK1ZmotCWIlIeLAQq8xtY_q0ggoRqWfuAFpd76VmX6gWBwflUpFUObbDUevBuqTft_IvNIQxqpx3XnY6nVKt3cZdgJom5w5bClU_irnrdjoh6oJNNUqLGlpd6rz_sb7TPhOqoe2zKb1WOdkIxtoVTOM0dxKVkfF8qVEFHpXekNcNTXqaIihWGIc5-rjo1IalQ6InzkWqWQJzRmSgeT_vvIh8ucgprPKUVJcVsGENuSvsW-bbBQjHGfTC0vgA_u5pG_anSt7b7rkW7PclsAWZ-v0T-l4WTjImzfO5XQHJbGPcrPXHCIYAMqhoS3V7tQiuBS4yggmW1I2NxuIcrjYblcbX0SIKYbdDPLGGXTfs4k8URYAnvXMiQnEM_qMU7usFHMahUWBWna_Yo4ifDNwlsvqq0WmGP69clEIEbTQru-JsJhY4YdXZ_TeI4xLOuMFyWrhN2OF2drlR8G_Q7iS8gMYY2tBrhiD3b2FfA3nkeYcTgBz0wWk8tWct0oWUaEkV7GycZlcmK1SC-R89TurdMnomPJsJdyC4iy68vnh5cXGx_2fCVKVceevY6XguMZDnx9GmYkajrnRM8OTU5xlCp84wakwxzJrz3BjyZSlxnzJea_eYdbE3mrRZ6NLFmwoFHqBqh5fu7vDsIdZ4mZkHsPl8Lr-jaoK3phMUhbkfQlEkhg8C1fLspfXQ9c58k_0mA3SX5S4mmuAO8zcGZV2E-em6m_9zOpMYr1Is1zZq-dSQ_ICRChI9bfbe702LgRAFZq3mktF9f9icdeI9HCI9VAwljGjSH-pl3ctvD5BoYdVLhzc9PiPCmi1KIysQwAQGg2evjIcDzGVBgnQ9vjhXRoq1-I8Qh0eQKrWCrD7KwWnZyFrU1lPDI7DEKacdS0Hlq5nwu9_nVS08sEudp_hEQ-6N4RX4QS-qs35o8b3ZOCHR4MdkBnAwPBClXC50XeKU4kuanqb4WDXHB3eg1px3e-d5F8U6c8VrPGjhvTvgr15130CLGb4c2FX8pgOtFl7KDv84rFkkrZStZv6JnspZzSfnPMXDdfGexgO8odVjsA8rOVL1RI5MDvbf_P-_AYKkJA4=)) ### `dynamic_map` @@ -239,14 +239,12 @@ We plan to add many GPU-accelerated, concurrent data structures to `cuCollection `cuco::hyperloglog` implements the well-established [HyperLogLog++ algorithm](https://static.googleusercontent.com/media/research.google.com/de//pubs/archive/40671.pdf) for approximating the count of distinct items in a multiset/stream. #### Examples: -- [Host-bulk APIs](https://github.com/NVIDIA/cuCollections/blob/dev/examples/hyperloglog/host_bulk_example.cu) (see [live example in godbolt](https://godbolt.org/z/G4qdcTezE)) -- [Device-ref APIs](https://github.com/NVIDIA/cuCollections/blob/dev/examples/hyperloglog/device_ref_example.cu) (see [live example in godbolt](https://godbolt.org/z/n88713o4n)) +- [Host-bulk APIs](https://github.com/NVIDIA/cuCollections/blob/dev/examples/hyperloglog/host_bulk_example.cu) (see [live example in godbolt](https://godbolt.org/clientstate/eJyNVm1v4kYQ_isj9wvkwAbaKi2XRCUvvVp3IqfAXXQqFVl2B1jFXrv7Akmj_PfOrjExTVrVoES7M_vMM8_MLH6KDBojC2Wi4e9PkRTRsN-JMqZWjq0wGkbcCRZ1IlM4zf06OZopOIKLonzUcrW20OJtGPQGP3Rg_DW9TEdwcX3z-fpmNE2vx7H3Df6fJEdlUIBTAjXYNcKoZJz-7Swd-IraE4FB3IOWd5hFO9ssar8PKI-Fg5w9giosOIMEIw0sZYaADxxLC1IBL_Iyk0xxhK206xBqhxPowLcdSLGwjPwZnShptWx6ArN76v5ZW1sOk2S73cYs0I4LvUqyytkkn9KLq_HkqkvU98e-qIyUBY1_Oqkp8cUjsJKYcbYgvhnbQqGBrTSSzRae-VZLK9WqA6ZY2i3TGHCENFbLhbMH4tU8Kf-mA8nHFAk3mkA6mUVwPpqkk07AuU2nv11_mcLt6OZmNJ6mVxO4vqFijS9TXypa_Qqj8Tf4mI4vO4AkHYXCh1L7LIiq9LKiqDScIB7QWBYVLVMil0vJoe4gWBUb1IrSghJ1LqteI5Ii4GQyl5bZsPcquRAqmanvpOKZEwgn3PEiWT8SUlas6Btztz6bqaaLXWtnbCJwQyDzDXJb6Ng7vXIxVBmkNon_CcFzZg9PcGOFwOXBnixIdmR5OJwcVUX_JTTjmkzzhcvu5_jASDYknpV5oSUu4RJzSthqZpHSNl4mar87n91w2EjvjirpYaiQHhJGn1NTiyKVpS6WqrUppGjP1BPtE5YXegr_9pxSm1k_StTzRMBXFyi14dDIv3BuQbl8Li3mhjz7Lsvg5AQGP70HSBLofzj3mQJU8g2HBxKfTM8gnGztMfzMen86-wEV-mzhbm-9C31LatrqXBO5rkwrWOIFrijPdqdyjFEJv-g18G8RqDxSVU0p0ISJM5bajGkBnmlosnrKaRB18SDzahO1LvQOqRf3-oNB_-djP1kV2JK5zMKGZQ5935J0mmaiLJQwfnAZfD_4eA7mHi1fgxfSQzFHpiAyGEFqVrWtGc33jJ72AZ9f0kkVXQQsI6hAAUknolpxfNUkXvm9x5MRDZyREMCoilVJidArtP0iZkL8h9ztA1DfZGHaWY47cLbyd-lWUjR_ObPlktoiOJFWpN__DLZbwrtGKyYwaIS_YBl3me8lD85JTKlIKvtYwwf5m01dVaG2innzzGmDVO3RqqMFEF4468dgFk21Owg4pD1v2TP1Z16ecGY2U1d14LfOvs1qf9Q3pnd9hRyosYVpHVrCY_yFygnQ2BNROPq1OWu9GadN0r7l_DLB0IV-3Gu_HZ4aI9sppdE6raBHy2d6WfA_wXQP6pd3ikhtOO8PfnR9MhelrV44oi4BnfJ37_rH0GWar09NPj_uQbdLN5OlP5ZioOhmLF-Et5BMLhqYnPOMNjfVewNtWO3UffTcqe00Kgd2mrro-Y_w-Rvi8QMW)) +- [Device-ref APIs](https://github.com/NVIDIA/cuCollections/blob/dev/examples/hyperloglog/device_ref_example.cu) (see [live example in godbolt](https://godbolt.org/clientstate/eJydWY9z2jgW_ld03OyNSQkkudvZGxIyR5tul9le0gl0OztlxwhbgCbG4iQ5hHbyv9_3JAtsAp3u0kyJ7aen9-N733tyvjaMMEaq3DS6n782ZNronrcaGc_nBZ-LRreRFClvtBpGFTqh687JOGcn7I1abbScLyyLkia7OLv4V4vd_ja4GfTZm7v7D3f3_dHg7rZNsk7-vUxEbkTKijwVmtmFYP0VT_BVPmmx34QmQ9hF-4xFJDBulM_Gjeal07JRBVvyDcuVZYURUCMNm8lMMPGUiJVlMmeJWq4yyfN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wTWxdIwql78-9IF_vzd671K2SOLsOc_L-JfX5cB8qfYbrd20oUNbgIx0Xa_Shm9EzmVXa0HuHcLaN3Wr6tqDgdkN6SY9lTMEc5mywu2QeV0cXZ8MKsfQuqh3FXeXiXttNFIxREoH7USVod1bkepw1ZWp1meJUUWBtoD0xAwr5U_EE6L7IGVTKWcgmpC64hO44qu2K08iPGqKUQPdacw6MHuMI1pQeNY3VHPKRUtt8VyikHn6JHL0dXuFRXCSOM5ipe9GfXL06JPwWEI-vVVX-qDeS20mY9q7WUCscSKDvL8yGuLvcSGG-8-fCTF1UP-1dXV-VmL_Xh-0aqZd319He3so-PFNv9bOByqhz8DhppTfwYL5cJvouFwLVd2uN6fLaJzT9yHR47dNFMvu243HMWOv2649uxLsT4S6r3R5WikW_vWBZng9veGsOw3vX19n8_CkEG94tvh732rVP27ymoDPWLBt7Rsu3B492CJ48eNYZEkwpi_AW4vAYay0O6IlluJUsTZBmucAjBXVh2iy0575kfXRqtBfRrHIL17rd_IH5Pk_OLH4hyP_UsaPGycQl8vefXq_Cd2ynWy6Jll_NMZOz1Fk7KnNNZhQkpPM76cuj8EZHJa0ZkkSYabj_7VPW5YnOceGs-t8Bx9sPYcsWo8_-H-_R_hsm5I)) ### `bloom_filter` `cuco::bloom_filter` implements a Blocked Bloom Filter for approximate set membership queries. #### Examples: -- [Host-bulk APIs](https://github.com/NVIDIA/cuCollections/blob/dev/examples/bloom_filter/host_bulk_example.cu) (see [live example in godbolt](https://godbolt.org/z/EY7T5v5aE)) - - +- [Host-bulk APIs](https://github.com/NVIDIA/cuCollections/blob/dev/examples/bloom_filter/host_bulk_example.cu) (see [live example in godbolt](https://godbolt.org/clientstate/eJydVm1v20YM_iuE9mF2I78FCwo4L4CXpJuxwsnstEUxD8HpRFuHynfavdgxgvz38U6SLSduMSwBEptHPnz4kEfpOTJojFDSRMO_niORRsNBHOVMLh1bYjSMuEtZFEdGOc399967uYR3cK2KrRbLzEKLt-G0f_pLDJPP45vxCK7vpvd309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U5bfJoWvGTIbGPz5Tv5J9vcfllDs5ZSWn_I6ci1yRXF5tT_bSmypjqx6vsIxbh8N2pEFNU3Vj_Ri029CrAMvxK2e3zLv4H3lfV9I0_SCvrCs2Ng3YFi4u6HHrh5KetvS5FiGYfd8q-2JvD7GUJK-wNNJUSPCr-oXetPz7C73R6P0LWSTXnA9Oz9yAjlVhy7e1qENAl_zkZPAeOkzz7NKsHt_3odOhzW3pj6UcmHZytkrCK1wukgYm5zwn47p86SID1Su_RS9xfU67-uCctIte_g6__wINDYAL)) \ No newline at end of file diff --git a/ci/pre-commit/example_links.py b/ci/pre-commit/example_links.py new file mode 100755 index 000000000..c0513bfde --- /dev/null +++ b/ci/pre-commit/example_links.py @@ -0,0 +1,178 @@ +#!/usr/bin/env python + +import os +import json +import git +import re +import argparse +import zlib +import base64 +import subprocess +import sys + +def open_file(file_path): + with open(file_path, 'r') as file: + data = file.read() + return data + +def write_file(file_path, data): + with open(file_path, 'w') as file: + file.write(data) + +def create_compiler_explorer_url(file_path, COMPILER_ID, COMPILER_FLAGS): + source_code = open_file(file_path) + # Prepare the JSON payload + payload = { + "sessions": [ + { + "id": 1, + "language": "cuda", + "source": source_code, + "compilers": [ + { + "id": COMPILER_ID, + "options": COMPILER_FLAGS, + "libs": [ + { + "id": "cccl", + "version": "trunk" + }, + { + "id": "cuco", + "version": "dev" + } + ] + } + ] + } + ] + } + + # Convert the payload to JSON + config_json = json.dumps(payload, separators=(',', ':')) + + # Compress the JSON using zlib (deflate) + compressed = zlib.compress(config_json.encode('utf-8')) + + # Base64 encode the compressed data + encoded = base64.urlsafe_b64encode(compressed).decode('utf-8') + + # Replace problematic unicode characters + # As per the documentation, map characters in the range \u007F-\uFFFF + encoded = ''.join( + c if '\u0000' <= c <= '\u007F' else '\\u{:04x}'.format(ord(c)) + for c in encoded + ) + + # Construct the final URL + url = f'https://godbolt.org/clientstate/{encoded}' + + return url + +def update_readme_with_urls(readme_path, url_table, args): + # Open and read the README.md file + readme_content = open_file(readme_path) + lines = readme_content.splitlines() + + updated_lines = [] + mismatched_files = [] + missing_files = [] # List of files not found in README.md + + # Iterate through each line of the README + for line in lines: + updated_line = line + # Check each file in the url_table + for file_name, url in url_table.items(): + # Check if the file name exists in the line + if file_name in line: + # Look for the specific godbolt link format and replace the URL + updated_line = re.sub( + r"\(see \[live example in godbolt\]\(https?://[^\)]+\)\)", + f"(see [live example in godbolt]({url}))", + line + ) + if updated_line != line: + mismatched_files.append(file_name) + + updated_lines.append(updated_line) + + # After updating lines, check if any example files are missing from README + for file_name in url_table.keys(): + # If the file name was not found in the README, add it to missing_files + if not any(file_name in line for line in lines): + missing_files.append(file_name) + + # Join the lines and write the updated content back to README.md + updated_content = "\n".join(updated_lines) + + if missing_files: + print(f"Error: The following example files are missing in README.md: {missing_files}") + sys.exit("FAILED: README.md is missing entries for the above example files") + + if args.fix: + write_file(readme_path, updated_content) + else: + if mismatched_files: + write_file(readme_path, updated_content) + print(mismatched_files) + sys.exit("FAILED: the above examples have out-of-date Godbolt links") + +COMPILER_ID = 'nvcc125u1' # Desired compiler ID +COMPILER_FLAGS = '-std=c++17 -arch=sm_70 --expt-extended-lambda' # NVCC compiler flags +EXAMPLES_DIR = "examples" # Path to the examples directory relative to the repo root + +def get_changed_cuda_files(): + # Run the git command to get the changed files + result = subprocess.run( + ['git', 'diff', '--cached', '--name-only', '--diff-filter=ACM'], + capture_output=True, + text=True + ) + + # Check if the command was successful + if result.returncode != 0: + print("Error executing git command:", result.stderr) + return [] + + # Get the output and filter for .cu files in EXAMPLES_DIR + return result.stdout.splitlines() + +def main(): + # Parse command-line arguments + parser = argparse.ArgumentParser(description="Ensure CUDA example files have up-to-date Godbolt links in the README.") + parser.add_argument('--fix', action='store_true', + help="Automatically update mismatched or outdated Godbolt links in the README with correct URLs.") + args = parser.parse_args() + + # Initialize the Git repository + repo = git.Repo(search_parent_directories=True) + repo_root = repo.git.rev_parse("--show-toplevel") + + # Ensure we are in the ci directory + ci_dir = os.path.join(repo_root, 'ci') + os.chdir(ci_dir) + + # Initialize a hash table (dictionary) to store file urls + url_table = {} + + # Get all CUDA files in the examples directory + example_files = [] + for root, _, files in os.walk(os.path.join(repo_root, EXAMPLES_DIR)): + for file_name in files: + if file_name.endswith('.cu'): + example_files.append(os.path.relpath(os.path.join(root, file_name), repo_root)) + + # Iterate through the example files and create URLs + for file_path in example_files: + full_file_path = os.path.join(repo_root, file_path) + url = create_compiler_explorer_url(full_file_path, COMPILER_ID, COMPILER_FLAGS) + if url: + url_table[file_path] = url # Store the file and its url in the hash table + # print(f"File: {file_path}: url: {url}") + + # Update README.md with the urls + readme_path = os.path.join(repo_root, "README.md") + update_readme_with_urls(readme_path, url_table, args) + +if __name__ == "__main__": + main()