{"id":25406715,"url":"https://github.com/donaurelio/parallel-templates","last_synced_at":"2025-04-12T22:57:20.478Z","repository":{"id":49699556,"uuid":"106184628","full_name":"DonAurelio/parallel-templates","owner":"DonAurelio","description":"C99 Templates for parallel programming","archived":false,"fork":false,"pushed_at":"2023-02-08T02:49:19.000Z","size":194,"stargazers_count":0,"open_issues_count":7,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T22:57:20.287Z","etag":null,"topics":["c99","parallel-programming","parallel-programming-patterns","stencil-patterns","stencil-template"],"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/DonAurelio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.MD","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-08T14:54:36.000Z","updated_at":"2023-02-08T02:49:24.000Z","dependencies_parsed_at":"2022-09-23T23:33:42.899Z","dependency_job_id":"d4971b22-6479-4161-a1a0-cd71bcde8e38","html_url":"https://github.com/DonAurelio/parallel-templates","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/DonAurelio%2Fparallel-templates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DonAurelio%2Fparallel-templates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DonAurelio%2Fparallel-templates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DonAurelio%2Fparallel-templates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DonAurelio","download_url":"https://codeload.github.com/DonAurelio/parallel-templates/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248643038,"owners_count":21138353,"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":["c99","parallel-programming","parallel-programming-patterns","stencil-patterns","stencil-template"],"created_at":"2025-02-16T05:37:00.460Z","updated_at":"2025-04-12T22:57:20.456Z","avatar_url":"https://github.com/DonAurelio.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Parallel Templates\n\n[![Build Status](https://travis-ci.org/DonAurelio/parallel-templates.svg?branch=master)](https://travis-ci.org/DonAurelio/parallel-templates)\n\nIt is a set of templates of parallel programming patterns in C (for High Performance Compiting). For example: **stencil** to programing differential equation solvers and cellular automatas; **map** to replicate an operation or function over a collection, bettwen other parallel programing patterns. \n\nEach template consists of 3 files: **template.c**, **parallel.yml** and **context.yml**\n\n```bash\nparallel-templates\n│\n└───templates\n        ├── stencil\n        │   ├── template.c\n        │   ├── parallel.yml\n        │   ├── context.yml\n        │   └── Makefile \n        └── map\n            ├── template.c\n            ├── parallel.yml\n            ├── context.yml\n            └── Makefile \n```\n\n## Files Descrition \n\n* template.c\n\n...It is a code wirtten C, but with some [jinja2](http://jinja.pocoo.org/) template syntax to add more flexibility to the user using the same template for different problems related with the same parallel programming pattern. This template must have a parallel programming pattern implicit. Additionally it must also be easily reusable.\n\n* parallel.yml\n\n...It is a metadata file in YAML format which in addition to having information of the template. It contains details of how it should be parallelized. That is, what OpenMP and OpenACC compile directives should go in each function and what loop lexicographically. This file is related with [#pragcc](https://github.com/DonAurelio/pragcc) tool.\n\n* context.yml\n\n...It is a metadata file in YAML format which contains values for the variables defined in a given template. This file can be modified by the user to get the same template with different values required by the problem to be specified in code.\n\n* Makefile\n\n...Contains the neccesary rules to compile and run the code, sequential and parallel.\n\n## Tests\n\nThe parallel_templates module is automatic tested by [Travis CI](https://travis-ci.org/), but you can perform test individually from the root directory ad follows.  \n\n```bash\npython3 -m unittest tests/loader.py\npython3 -m unittest tests/templates.py\n```\n\n## API\n\nThis tool has an API to interact with the templates available in the application, at the moment it only has the stencil parallel programming pattern template. However, **you can contribute to the growth of these**. \n\nThe Api was developed with [Flask Restplus](https://flask-restplus.readthedocs.io/en/stable/). To run a API install requirements and run the application from the root directory ad follows:\n\n\n```bash\npip3 install -r ./api/requirements.txt\npython3 api/app.py\n```\n\nThe API with run at [http://localhost:5000](http://localhost:5000)\n\n### Deployment\n\nThe API can run inside a Docker Container. To get it done, perform the following commands from the root directory.\n\n```sh\ndocker build -t templates .\ndocker run --rm -d -v ${PWD}:/usr/src/app -p 5001:5000 templates python3 api/app.py\n```\n\n\n# References\n\n[Structured Parallel Programming: Patterns for Efficient Computation](https://www.amazon.com/Structured-Parallel-Programming-Efficient-Computation/dp/0124159931)\n\n[Designing a RESTful API using Flask-RESTful](https://blog.miguelgrinberg.com/post/designing-a-restful-api-using-flask-restful)\n\n[REST API response format using HTTP status codes](https://github.com/adnan-kamili/rest-api-response-format)\n\n[Flask-RESTful](http://flask-restful.readthedocs.io/en/latest/)\n\n[Designing a RESTful API with Python and Flask](https://blog.miguelgrinberg.com/post/designing-a-restful-api-with-python-and-flask)\n\n[AJAX with jQuery](http://flask.pocoo.org/docs/0.12/patterns/jquery/)\n\n[Flask Examples Github](https://github.com/pallets/flask/tree/master/examples/jqueryexample)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonaurelio%2Fparallel-templates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdonaurelio%2Fparallel-templates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonaurelio%2Fparallel-templates/lists"}