{"id":19500309,"url":"https://github.com/aabduvak/matrix-calculator","last_synced_at":"2025-08-01T16:45:26.362Z","repository":{"id":156889850,"uuid":"572120124","full_name":"aabduvak/matrix-calculator","owner":"aabduvak","description":"Just assignment from Parallel Computing lecture","archived":false,"fork":false,"pushed_at":"2022-12-16T20:56:52.000Z","size":6268,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-08T10:11:59.853Z","etag":null,"topics":["multithreading","parallel-computing"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aabduvak.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":"2022-11-29T15:40:39.000Z","updated_at":"2023-06-14T12:07:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"3522232f-4b75-4a99-91bf-e29426fd944d","html_url":"https://github.com/aabduvak/matrix-calculator","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/aabduvak%2Fmatrix-calculator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aabduvak%2Fmatrix-calculator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aabduvak%2Fmatrix-calculator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aabduvak%2Fmatrix-calculator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aabduvak","download_url":"https://codeload.github.com/aabduvak/matrix-calculator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240748099,"owners_count":19851211,"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":["multithreading","parallel-computing"],"created_at":"2024-11-10T22:08:08.742Z","updated_at":"2025-02-25T21:21:43.337Z","avatar_url":"https://github.com/aabduvak.png","language":"C","funding_links":["https://www.buymeacoffee.com/aabduvak"],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e 👨🏻‍💻 Matrix Calculator \u003c/h1\u003e\n\n\u003ch2 align=\"center\"\u003eJust assignment from Parallel Computing lecture 🫥\u003c/h2\u003e\n\n\u003cdiv align=\"center\" style=\"height: \"\u003e\n  \u003cimg src=\"https://github.com/aabduvak/matrix-calculator/assets/matrix.gif\"\u003e\n\u003c/div\u003e\n\n## Rules:\n1. All matrixes must be square: [7][7], [4][4] or [2][2]\n2. Bigger matrix must be first argument\n3. Content of matrix must be numeric value\n\n## Functions ##\n\nOnly the following functions are used in this project:\u003cbr\u003e\n| Function | Description | Function | Description |\n|----------|-------------|----------|-------------|\n| atoi | convert ascii to integer | pthread_create | create a new thread |\n| printf | format and print data | pthread_mutex_unlock | releases the mutex object |\n| calloc | allocate dynamic memory | pthread_join | join with a terminated thread |\n| free | free dynamic memory | pthread_mutex_init | initialise the mutex |\n| write | write to a file descriptor | pthread_mutex_destroy | destroy the mutex object |\n| usleep | suspend execution for microsecond intervals | pthread_mutex_lock | lock the mutex object |\n\n## Starting ##\nClone this project and change directory\n```bash\ngit clone https://github.com/aabduvak/matrix-calculator \u0026\u0026 cd matrix-calculator\n```\nTo compile the program you may use **Makefile**\nif your linux os doesn't have **make** package just run setup.sh\n\n```bash\nbash setup.sh\n```\n\nAfter installation of all packages you may use make command to compile the project \n```bash\nmake\n```\nTo run program\n```bash\n./matrix data/m1.mx data/m0.mx\n```\nor just use **Makefile** with default params\n```bash\nmake run\n```\nSome usefull commands:\n```bash\n# To remove objects\nmake clean\n\n# To remove objects and executable\nmake fclean\n\n# To check data races\nmake test\n\n# To check memory leaks\nmake leaks\n```\n\n## Links ##\n- [pthreads Tutorial](https://randu.org/tutorials/threads/)\n- [Playlist about C Threads](https://www.youtube.com/watch?v=d9s_d28yJq0\u0026list=PLfqABt5AS4FmuQf70psXrsMLEDQXNkLq2)\n- [pthreads Short Introduction](https://www.youtube.com/watch?v=d9s_d28yJq0)\n- [How to pass arguments to threads](https://www.youtube.com/watch?v=HDohXvS6UIk)\n- [What are detached threads?](https://www.youtube.com/watch?v=-i8Kzuwr4T4)\n- [An Application of Pthreads and Mutexes](http://files.kipr.org/gcer/2009/proceedings/Myers_ApplicationPthreads.pdf)\n- [Multithreading part 1](https://www.youtube.com/watch?v=GNw3RXr-VJk)\n- [Multithreading part 2](https://www.youtube.com/watch?v=sDLQWivf1-I)\n\n---\n[![\"Buy Me A Coffee\"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/aabduvak)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faabduvak%2Fmatrix-calculator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faabduvak%2Fmatrix-calculator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faabduvak%2Fmatrix-calculator/lists"}