C++ CUDA циклы For и find
204 USDЗдравствуйте, нужно ускорить циклы for и find, собственно перекинуть их на Cuda + что бы код поддерживал работу с несколькими видеокартами одновременно для ускорения работы.
Visual studio c++
int c, i, f; //global variables
string o;
int gdfsds = 0;
void test(int pos)
{
// тут вообще другой код, но для теста и этот сойдёт, так как он не важен,смысл в том что тут я работаю с цифрами из циклов.
if (c == 5)
{
if (i == 2)
{
if (f == 50)
{
gdfsds = gdfsds + pos;
}
}
}
o = o + to_string(c) + to_string(i) + to_string(f);
}
int main() {
string str = "123312311222313123232313232132323321321323134441231231312413123"; // длина стр доходит до 100к-1млн символов.
string::size_type pos = 0;
unsigned int start_time = clock();
// Время выполнения на i3 208 сек
for (c = 0; c < 29; c++) // ускорить это
{
for (i = 0; i < 30; i++) // ускорить это
{
for (f = 0; f < 53; f++) // ускорить это
{
while ((pos = str.find("123", pos)) != string::npos) { // ускорить это
//find должен быть внутри Циклов for
test(pos);
pos += 1;
}
pos = 0;
}
pos = 0;
}
pos = 0;
}
unsigned int end_time = clock();
unsigned int search_time = end_time - start_time;
std::cout << "времЯ работы " << search_time / 1000 << " секунд" << endl;
cout << gdfsds << endl;
std::system("pause");
return 0;
}
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 16 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 17 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 18 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 14 hours back ∙ 15 proposals |