16,022,362 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Armando Martínez González (Top 3 by date)
Armando Martínez González
26-Apr-12 2:14am
View
si matcom (Katrib Somoza Iskander) de que año tu eres?
Armando Martínez González
24-Apr-12 23:15pm
View
what i had in mind was to substitute the double for for a parallel for and call the following method instead i wasn't able to find out how to call a method inside a parallel for other than those who are void and accept a single int parameter as i said in the other reply to Leonardo Paneque i am almost certain i am missing something but i cat find what it is and also it si possible you just told me what to do but again my english is not that good
<pre lang="c#"> void CopyDepthToTexture(int x, ref int d, short[] data, CustomPixels.ARGB[,] depthBuffer, ref float lessSignificant, ref float middleSignificant, ref float moreSignificant)
{
//d = data[y * depthBuffer.GetLength(1) + x] >> DepthImageFrame.PlayerIndexBitmaskWidth;
d = data[x] >> DepthImageFrame.PlayerIndexBitmaskWidth;
lessSignificant = 0;
middleSignificant = 0;
moreSignificant = 0;
if (d != unknownDepth && d != tooFarDepth && d != tooNearDepth)
{
lessSignificant = (d % 64) / 64f;
middleSignificant = ((d / 64) % 64) / 64f;
moreSignificant = ((d / (64 * 64)) % 64) / 64f;
}
depthBuffer[x % depthBuffer.GetLength(0), x / depthBuffer.GetLength(0)] = new CustomPixels.ARGB(moreSignificant, middleSignificant, lessSignificant, 1);
}
}</pre>
Armando Martínez González
24-Apr-12 22:58pm
View
I tried to use parallel for but it can be done as far as i know only with a task<int> and i use alot of variables to do the code inside the for and task are static so no fields either i dont know how to get the variables i need in static method with just an int as a parameter i am almost certain i am missing something but i cat find what it is