{"id":22625530,"url":"https://github.com/thomasms/forts","last_synced_at":"2025-03-29T03:26:12.391Z","repository":{"id":84950417,"uuid":"125431321","full_name":"thomasms/forts","owner":"thomasms","description":"Wraps c++ containers for fortran use","archived":false,"fork":false,"pushed_at":"2018-10-22T20:50:46.000Z","size":50,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-03T13:23:04.721Z","etag":null,"topics":["cpp","fortran","generic"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thomasms.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":"2018-03-15T22:05:12.000Z","updated_at":"2021-08-13T15:15:13.000Z","dependencies_parsed_at":"2023-03-13T03:46:20.760Z","dependency_job_id":null,"html_url":"https://github.com/thomasms/forts","commit_stats":{"total_commits":36,"total_committers":2,"mean_commits":18.0,"dds":0.02777777777777779,"last_synced_commit":"e2677fc3505bb8cf1ad3f38aaf256093c2afefe9"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasms%2Fforts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasms%2Fforts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasms%2Fforts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasms%2Fforts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomasms","download_url":"https://codeload.github.com/thomasms/forts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246133692,"owners_count":20728744,"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":["cpp","fortran","generic"],"created_at":"2024-12-09T00:26:08.148Z","updated_at":"2025-03-29T03:26:12.360Z","avatar_url":"https://github.com/thomasms.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Forts\n## For those who hate linked lists in Fortran\n### Wraps c++ containers for fortran\n\n[![Build Status](https://travis-ci.org/thomasms/forts.svg?branch=master)](https://travis-ci.org/thomasms/forts)\n\nSo far only supports std::vector with integer and double kinds. Some benchmarking is done against a native dynamic integer array in Fortran and it shows just how quick the c++ implementation is in comparison. For appends in excess of 100,000 the difference is huge!!\n\nIt heavily uses the preprocessor for both C and Fortran but users should not have to deal with it directly. It is used to make Fortran and C code generic.\n\n### How to use\nInteger (4 byte kind) vector in fortran.\n```Fortran\nprogram example\n    use fortsintvector_m\n    \n    type(FortsIntVector) :: vector\n    integer :: size\n    \n    ! Init is required always \n    call vector%init()\n    \n    call vector%append(38)\n    call vector%append(-931)\n    call vector%append(45)\n    \n    ! should equal 3\n    size = vector%size()\n    \n    ! no need to destroy, finalize will take care of this\n    \nend program example\n```\n\nReal (8 byte kind) vector in fortran.\n```Fortran\nprogram example\n    use fortsdoublevector_m\n\n    type(FortsDoubleVector) :: vector\n    integer :: size\n\n    ! Init is required always\n    call vector%init()\n\n    call vector%append(3.48)\n    call vector%append(-0.931)\n    call vector%append(45.3e-8)\n\n    ! should equal 3\n    size = vector%size()\n    \n    ! no need to destroy, finalize will take care of this\n\nend program example\n```\n\nMuch more work needed:\n- Needs more unit testing\n- Needs more benchmarking\n- Other container types\n- Generic structure containers\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasms%2Fforts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomasms%2Fforts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasms%2Fforts/lists"}