Find Jobs
Hire Freelancers

C++: Simple Code Parallelization, one thread per core.

$30-5000 USD

Concluído
Publicado há aproximadamente 14 anos

$30-5000 USD

Pago na entrega
I have a function: int MyFunc(void *Data, const int &DataNum) in C++. I'd like to run the function many times, with DataNum ranging from 0...N-1. I'd like to run one function on each core, presumably on its own thread. When one function finishes, I'd like the next one to start. Typically, I have a multi-core processor with, say M cores, where M is typically about 4. Typically, I have N pieces of data, where N typically ranges from 2 to 12. (Sometimes I have more cores than data!) I'm looking for a class with a static function. Something like this: class SpawnFunctionOnProcessorCores() { public: static std::vector<int> SpawnAndWait( int (*Command)(void *, const int &i), void *Data, const int &MinNum, const int &MaxNum, const DWORD &TimeToWaitInMilliSeconds); } I'll be using Visual Studio 2008 on Windows. The return is the vector of results from the functions. Also, please give me a simple test program to show the function is working. ## Deliverables You can do this program pretty much any way you want. My understanding is that there are some open-source multi-core commands support by Visual Studio. If you use them, great. If not, no problem. Also, I have a class called SpawnThread, which currently spawns a bunch of threads at once. Presumably, all you need to do is figure out the number of processors on the computer, and add a thread affinity. (You might also need to know when a thread ends, so that you can spawn the next one.) If it will be helpful to you, I can share the class with you. But, I suspect you want to write your own thing.
ID do Projeto: 3271785

Sobre o projeto

9 propostas
Projeto remoto
Ativo há 14 anos

Quer ganhar algum dinheiro?

Benefícios de ofertar no Freelancer

Defina seu orçamento e seu prazo
Seja pago pelo seu trabalho
Descreva sua proposta
É grátis para se inscrever e fazer ofertas em trabalhos
Concedido a:
Avatar do Usuário
See private message.
$42,50 USD em 14 dias
5,0 (4 avaliações)
3,1
3,1
9 freelancers estão ofertando em média $61 USD for esse trabalho
Avatar do Usuário
See private message.
$42,50 USD em 14 dias
5,0 (99 avaliações)
6,0
6,0
Avatar do Usuário
See private message.
$84,15 USD em 14 dias
5,0 (15 avaliações)
5,7
5,7
Avatar do Usuário
See private message.
$85 USD em 14 dias
4,4 (75 avaliações)
5,8
5,8
Avatar do Usuário
See private message.
$63,75 USD em 14 dias
3,9 (3 avaliações)
5,8
5,8
Avatar do Usuário
See private message.
$85 USD em 14 dias
5,0 (28 avaliações)
4,0
4,0
Avatar do Usuário
See private message.
$42,50 USD em 14 dias
0,0 (0 avaliações)
0,0
0,0
Avatar do Usuário
See private message.
$80,75 USD em 14 dias
0,0 (0 avaliações)
0,0
0,0
Avatar do Usuário
See private message.
$25,50 USD em 14 dias
0,0 (0 avaliações)
0,0
0,0

Sobre o cliente

Bandeira do(a) UNITED STATES
Boston, United States
5,0
33
Membro desde mar. 23, 2006

Verificação do Cliente

Obrigado! Te enviamos um link por e-mail para que você possa reivindicar seu crédito gratuito.
Algo deu errado ao enviar seu e-mail. Por favor, tente novamente.
Usuários Registrados Total de Trabalhos Publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Carregando pré-visualização
Permissão concedida para Geolocalização.
Sua sessão expirou e você foi desconectado. Por favor, faça login novamente.