{"id":26167492,"url":"https://github.com/raftlib/affinity","last_synced_at":"2025-04-14T17:43:40.420Z","repository":{"id":48088411,"uuid":"251317823","full_name":"RaftLib/affinity","owner":"RaftLib","description":"Pulled out existing affinity setting code to put in a separate library. Code simply wraps affinity routines, aims to be cross platform, but currently  only supports linux. ","archived":false,"fork":false,"pushed_at":"2023-07-24T14:26:23.000Z","size":26,"stargazers_count":5,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-14T17:43:36.562Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RaftLib.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-30T13:45:05.000Z","updated_at":"2024-12-31T12:48:51.000Z","dependencies_parsed_at":"2025-03-11T17:42:41.287Z","dependency_job_id":"0798f6f2-b067-4a70-923d-e06c1b061618","html_url":"https://github.com/RaftLib/affinity","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaftLib%2Faffinity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaftLib%2Faffinity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaftLib%2Faffinity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaftLib%2Faffinity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RaftLib","download_url":"https://codeload.github.com/RaftLib/affinity/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248930099,"owners_count":21184951,"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","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":[],"created_at":"2025-03-11T17:37:51.724Z","updated_at":"2025-04-14T17:43:40.398Z","avatar_url":"https://github.com/RaftLib.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Affinity\n\n## Build status\n![CI](https://github.com/RaftLib/affinity/workflows/CI/badge.svg)\n\n## Notes\n* Pulled out raftlib core affinity functions to \ntry to make more modular. This piece looks like \nit should be tested in isolation. \n* To build\n```bash\ncmake \u003cpath to affinity\u003e -Wno-dev -CMAKE_BUILD_TYPE=[Release/Debug] -GNinja\nninja\nninja test\n```\n* You can inject your own namespace if you'd like by\nsetting the following options, also include the moduleflags.cmake\nfile at the global level so that CFLAGS prop through all files:\n```bash\n-DAFFINITY_CUSTOM_NAMESPACE=YES\n-DAFFINITY_NAMESPACE=\u003cName\u003e\n```\n* test cases only test functionality at the moment, \nneed to add test cases for perf as well and more \ncorner cases. \n\n## Usage\nInclude the header file\n```cpp\n#include \u003caffinity\u003e\n```\nthen link \n```bash\n-laffinity\n```\nand use this library inside your c++ code base\n```cpp\naffinity::set( core );\n```\nand that's pretty much it. If you've chosen to \ninject your own namespace when building the\nlibrary, you'll need to modify the invocation\nabove like this:\n```cpp\nyour_namespace::affinity::set( core );\n```\n\n## Platforms\n* Currently  only sets affinity for Linux, \nwill assign others to do Win/Mac at some point.\n* CI currently only checks Linux but will add\nothers as we enable setting affinity on those\nplatforms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraftlib%2Faffinity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraftlib%2Faffinity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraftlib%2Faffinity/lists"}