phil126

Member
  • Content count

    16
  • Joined

  • Last visited

Community Reputation

199 Neutral

About phil126

  • Rank
    Member
  1. Writing DSP Code

    I perform real-time DSP processing using CUDA for signal processing applicatiions. My application are in 5-10 mega sample range, much high than audio sampling without much problem. Depending on what algorithms you want to run it really should not be a problem. Using CUDA you can directly write from the PCIe audio capture device to the CUDA GPU without going thourgh CPU memory as of CUDA 4.x. This cut down on the latency. The best latency you will see is around 5ms.
  2. What type of noise are you trying to model, White Gaussian or a "colored" noise? If you just need gaussian at a given level. http://people.sc.fsu.edu/~jburkardt/cpp_src/normal/normal.html Their stuff seems to work.
  3. Why powers of twos?

    Each binary place represents a double. So a 1 bit number is either 1 or 0 2 bit 0,1,2,3 (4 numbers) or 2^2 3 bit 0,1,2,3,4,5,6,7 (8 numbers) 2^3 4 bit number 0,...,15 (16 numbers) 2^4 A binary system is always going to have 2^(number bits) unique number reprensenations.
  4. Are you trying to solve them analytically or numerically?
  5. Thanks for your quick replies. I was pretty sure it was not possible. I just needed seom ammo for when I go inot a management meeting to tell the customer they have conflicting requirements. I was pretty sure it was not possible. I will try to do a quick test of the method stated.
  6. The requirement comes from a safety specification. The program is an interface for test equipment which has to have a master off button which apparently needs to be accessed even if the program is not logged in. The master off button cuts the power to everything. It is a duplicate of the hardware version of the big red button. The argument is that the button needs to exist the moment the equipment is powered up. (They at least gave me the time for the computer to boot) The reason the user has to log in is that the users must have network authentication.
  7. I have an interesting question for the Microsoft programmers. This is not game related but windows environment related. I received a requirement for a window or dialog to be persistent which I took to mean always on top and in the same location but at coding a demo the customer informed me that they wanted the window to persistent even if the user logs on and off the computer. So I ask the question is this even possible in the Microsoft Windows Environment? Can I display a window constantly displayed even at the log in screen?
  8. When creating a thread specify the which processor to run the thread. This will force the the OS to put that thread on that processor. I will remind you that now you have to check how many processors there are and if a processor is "pegged" and you tell you new thread to run on it oh well. But when you run massivly parallel code ie >4 cpus you almost have to specify what cpu to use. At least this has been my experience. MS(XP,2003) and Linux (cerca '02) do not scale scale well beyond 2 cpus. I do not know about Vista or the newer Kernel of Linux. SGI actaully had the best scaling OS scheduler that I ever used. My 2 cents.
  9. Math has been extremly important for me. Look at it this way how many forum questions in OpenGL and DirectX always have to with Matrix transforms or numerical methods. It is important in game physics, AI, game play, optimization, etc... So unless you just want to program interfaces or GUI then I would say go for the most math you can.
  10. solutions for linear systems

    If you use the conjugate gradient method http://www.cs.cmu.edu/~quake-papers/painless-conjugate-gradient.pdf. It will give you a solution even if the matrix is ill conditioned or does not have an inverse. In those cases the answer you will get will be the soultion with the "highest energy". It also uses a set number of operations which can be useful in a situation where the timing is critical.
  11. problems solving for time

    Don't set anything equal to zero Just solve for t. t = (sqrt(v^2+2*a*d)-v)/a
  12. If that was the case the RAM was bad to begin with. His progrtam just tested much like memtest.
  13. moving on a sphere

    I personally would convert to a spherical coordinate system. http://mathworld.wolfram.com/SphericalCoordinates.html That way you only do the conversion to x,y,z once. Every thing else can be done in r,phee,and z.
  14. Matrix Math - Bane of my Existence

    You might want to take a numerical methods class. I did not truly realize the power of matrix and vector math until a took a numerical methods. Once you realize how to solve systems of equations or complex equations into a system of simplier equations it all starts to fall into place. My background is Electrical Engineering and usually most problems wind up having to be solved numerically.
  15. Opening Unknown Files?

    If you are allowed to use some of Windows Shell The following sample console application illustrates the use of SHFileOperation to copy files from one directory to another. The source and destination directories, C:\My_Docs and C:\My_Docs2, are hard-coded into the application for simplicity. It is MSDN under Managing the File System #include <shlobj.h> #include <shlwapi.h> int main(void) { IShellFolder *psfDeskTop = NULL; IShellFolder *psfDocFiles = NULL; IMalloc *pMalloc = NULL; LPITEMIDLIST pidlDocFiles = NULL; LPITEMIDLIST pidlItems = NULL; IEnumIDList *ppenum = NULL; SHFILEOPSTRUCT sfo; STRRET strDispName; TCHAR szParseName[MAX_PATH]; TCHAR szSourceFiles[256]; int i; int iBufPos = 0; ULONG chEaten; ULONG celtFetched; size_t ParseNameSize = 0; HRESULT hr; pzSourceFiles[0] = '\0'; hr = SHGetMalloc(&pMalloc); hr = SHGetDesktopFolder(&psfDeskTop); hr = psfDeskTop->ParseDisplayName(NULL, NULL, L"c:\\My_Docs", &chEaten, &pidlDocFiles, NULL); hr = psfDeskTop->BindToObject(pidlDocFiles, NULL, IID_IShellFolder, (LPVOID *) &psfDocFiles); hr = psfDeskTop->Release(); hr = psfDocFiles->EnumObjects(NULL,SHCONTF_FOLDERS | SHCONTF_NONFOLDERS, &ppenum); while( (hr = ppenum->Next(1,&pidlItems, &celtFetched)) == S_OK && (celtFetched) == 1) { psfDocFiles->GetDisplayNameOf(pidlItems, SHGDN_FORPARSING, &strDispName); StrRetToBuf(&strDispName, pidlItems, szParseName, MAX_PATH); hr = StringCchLength(szParseName, MAX_PATH, &ParseNameSize); if (SUCCEEDED(hr)) { for(i=0; i<=ParseNameSize, i++) { szSourceFiles[iBufPos++] = szParseName[i]; } pMalloc->Free(pidlItems); } } ppenum->Release(); szSourceFiles[iBufPos] = '\0'; sfo.hwnd = NULL; sfo.wFunc = FO_COPY; sfo.pFrom = szSourceFiles; sfo.pTo = "c:\\My_Docs2\0"; sfo.fFlags = FOF_SILENT | FOF_NOCONFIRMATION | FOF_NOCONFIRMMKDIR; hr = SHFileOperation(&sfo); SHChangeNotify(SHCNE_UPDATEDIR, SHCNF_PATH, (LPCVOID) "c:\My_Docs2", 0); pMalloc->Free(pidlDocFiles); pMalloc->Release(); psfDocFiles->Release(); return 0; }