Find Jobs
Hire Freelancers

Require assistance parallelising a for loop within c#

$10-30 USD

Closed
Posted over 3 years ago

$10-30 USD

Paid on delivery
i need someone who understands the problem and is able to help me solve it, while explaining the solution and the problem. please only message me if you have a solution to the problem, i dont have much time to waste. Request detail I currently have a c# application (.net) that i wish to parallelise, i have already attempted to parallelise it: the original for loop: for (ii = 0; ii < 2 * [login to view URL]((double)N / (double)wSamp) - 1; ii++) { for (jj = 0; jj < wSamp; jj++) { temp[jj] = x[ii * (wSamp / 2) + jj]; } tempFFT = fft(temp); for (kk = 0; kk < wSamp / 2; kk++) { Y[kk][ii] = (float)[login to view URL](tempFFT[kk]); if (Y[kk][ii] > fftMax) { fftMax = Y[kk][ii]; } } } my attempt at parallelising it: [login to view URL] (0, 2 * (int)[login to view URL]((double)n / (double)wsamp) - 1, ii => { for (jj = 0; jj < wsamp; jj++) { temp[jj] = x[ii * (wsamp / 2) + jj]; } tempfft = fft(temp); for (kk = 0; kk < wsamp / 2; kk++) { y[kk][ii] = (float)[login to view URL](tempfft[kk]); if (y[kk][ii] > fftmax) { fftmax = y[kk][ii]; } } }) ; However, while this code compiles it gives me a run time error saying 'index out of loop' for the y component. I'm assuming the issue is due to the y array and parallelising not being compatible with arrays. the full function is as follows: float[][] stft(Complex[] x, int wSamp) { //int ii = 0; int ll = 0; int kk = 0; int jj = 0; int N = [login to view URL]; float fftMax = 0; float[][] Y = new float[wSamp / 2][]; Complex[] temp = new Complex[wSamp]; Complex[] tempFFT = new Complex[wSamp]; for (ll = 0; ll < wSamp / 2; ll++) { Y[ll] = new float[2 * N / wSamp]; } for (ii = 0; ii < 2 * [login to view URL]((double)N / (double)wSamp) - 1; ii++) { for (jj = 0; jj < wSamp; jj++) { temp[jj] = x[ii * (wSamp / 2) + jj]; } tempFFT = fft(temp); for (kk = 0; kk < wSamp / 2; kk++) { Y[kk][ii] = (float)[login to view URL](tempFFT[kk]); if (Y[kk][ii] > fftMax) { fftMax = Y[kk][ii]; } } } for (int ii = 0; ii < 2 * [login to view URL]((double)N / (double)wSamp) - 1; ii++) { for (kk = 0; kk < wSamp / 2; kk++) { Y[kk][ii] /= fftMax; } } return Y; }
Project ID: 27790493

About the project

3 proposals
Remote project
Active 3 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
3 freelancers are bidding on average $178 USD for this job
User Avatar
actually I don't understand what you want from this code however, I'm ready to help you before agreement we need to have a meeting to understand your requirements
$485 USD in 25 days
0.0 (0 reviews)
0.0
0.0
User Avatar
I can certainly do this. Can you provide a sample input and output data to test the code ? I have a lot of experience in programming in audio and signal processing domain. I want to do it quickly, today itself. Can you confirm ? I will start once you provide sample I/O data.
$30 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
Hi, I am interested to apply for this position. Now I am working as Full Stack .Net Developer and Team Leader with 11.6(10+1.6) years of work experience in Asp.Net Core MVC, Asp.Net MVC, Web Forms, C#, Web API, Entity Framework, LINQ, WCF, WPF, MS-SQL and ReactJS.
$20 USD in 7 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
Santa Clara, United States
0.0
0
Member since Oct 16, 2020

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.