C for Linux, work with files and flows
Assume that a massive file is a text file, the elements are a text presentation of numbers from 0 to 255, and the number of columns and rows in the massive is pair. The number of flows that can be submitted in the form of a argument is 1, 2, 4 or 8.
The task of the program is to re-scale the mass in such a way that the columns and rows are reduced by 2 times, while the new elements are considered as the average arithmetic of the four neighboring elements. (The picture with the explanation will be in the investments).
Calculations must be divided between a certain number of flows.
The final file must be recorded in the newly created file.
The program should show how much time was spent on the calculation.
Необходимо написать программу, которая будет брать два аргумента для запуска. Первый аргумент будет интерпретирован как название файла, в котором содержится массив чисел, второй - это кол-во потоков, которые будут использованы для вычисления. Программа обязана быть написана в чистом С на стандартных библиотеках для системного программирования, без использования каких-либо библиотек С++.
Предположим, что файл с массивом это текстовый файл, элементы это текстовая презентация чисел от 0 до 255, а количество столбцов и рядов в массиве является парным. Кол-во потоков, которые можно подать в виде аргумента это 1, 2, 4 или 8.
Заданием программы есть ремасштабирование массива таким способом, чтобы кол-во столбцов и рядок уменьшилось в 2 раза, при том новые элементы считаются как среднее арифметическое четырёх соседних элементов. (картинка с обьяснением будет во вложениях).
- Вычисления должны быть разделены между определенным количеством потоков
- Конечный массив должен быть записан в новосозданный файл
- Программа должна показать сколько времени было потрачено на вычисления
Applications 1
Client's review of cooperation with Konstantin Chubenko
C for Linux, work with files and flowsThe work was done well, the requirements were fulfilled, the wishes were taken into account. The main thing is to voice them. During the first test there were a few nuances, but they cleared very quickly. A pleasant and good expert, I recommend you to collaborate!
Freelancer's review of cooperation with Aleksandr Tilnoy
C for Linux, work with files and flowsA quick payment, a quick payment.
It was a pleasure to work with this customer.
-
245 17 0 Hello to you!
I will complete it quickly and efficiently, and I will write comments to the program code.
Please call me, I will be happy to help.
Current freelance projects in the category C & C++
Comparative analysis of the effectiveness of custom software (v2.2-field) and reference software (Meshtastic v2.x)
22 USD
Comparative analysis of the effectiveness of custom software (v2.2-field) and reference software (Meshtastic v2.x) on the identical hardware platform (ESP32 + SX1268, 2W) based on the criteria of range, throughput, link stability, and power consumption. Conduct tests with… C & C++, C# ∙ 3 days 20 hours back ∙ 2 proposals |
Consultation and audit of the current project on Odoo 19 Community EditionWe are looking for an Odoo Developer — a solo developer with experience in Odoo 19 Community Edition, including using Claude Code. We need a specialist who has successfully implemented projects in Odoo and practical experience in development using Claude Code. Important: we only… C & C++, Javascript and Typescript ∙ 6 days 21 hours back ∙ 8 proposals |
Software development for Arduino (RF modules 3–7.5 GHz, automatic frequency scanning)It is necessary to develop a system on Arduino for the automatic search of active analog video signals and the automatic tuning of the transmitter to the detected frequency.It is planned to use three separate transceiver modules: 3000–4200 MHz; 4900–6000 MHz; 6100–7500… C & C++, Embedded Systems & Microcontrollers ∙ 7 days 21 hours back ∙ 4 proposals |
Black Ukraine (RP-project on base MTA)
1154 USD
|
Residential Proxy Infrastructure EngineerWe're building a residential proxy network from scratch — fully owned, no third-party suppliers. We need one exceptional network engineer to build the entire technical foundation. What you'll build: - Android background SDK that routes proxy traffic through user devices… C & C++, DevOps ∙ 13 days 18 hours back ∙ 15 proposals |