Programming :: ASM - Making A Multimedia Library To Speedup Vector And Matrix Computation
Sep 2, 2010I'm making a multimedia library to speedup vector and matrix computation. But I'm getting a strange error, in this code
[Code]....
I'm making a multimedia library to speedup vector and matrix computation. But I'm getting a strange error, in this code
[Code]....
I have recently installed Octave on my desktop and I am very busy with RTFM ATM.However, this manual is huge and I could not find an answer to my problem. What I basically want to do is initialize a vector like
Code:
a=[]
for i 1:100
a = [ a i ]
endfor
Now my problem is that this will call the pager and I have to hit 'q' to get my prompt back. I know I can turn it off but the screen will still get cluttered with tons of output.Is there a way to initialize 'a' quietly without any screen output?
I just can't find... why is my code seg-faulting?
PHP Code:
/*
Code name: Assignment #7.
File name: slice.c
Program name: Matrix multiplication (parallel version).
Version: 1.
[Code]...
Is giving my a seg-fault right at the ending point where I do the final gather from the MASTER processor.
I'm not really a C++ noob at all, but I am a little rusty at the moment. Still, I CANNOT figure out what is wrong with the following code. I'm using Visual Studio 2010.
Code: #include <iostream>
#include <fstream>
#include <vector>
#include <string>
[Code]....
I THINK I got all of the pertinent code. Anyway, it fails at the *** line. I CANNOT figure out why. If I modify it to be linein.size()-30, it STILL gives me an error. That makes zero sense.
i need to implement a Set class(like in stl) using a vector.Here is my code that doesnt work corectly:
Code:
#include <iostream>
#include <vector>
template<class T>
class Set
{
[Code]....
is there any problem that might rise by by having a vector as a member of struct in c++ as follows.ex.
struct A
{
int a;
[code]...
I am trying to simulate a shell. So what I do is checking of having the parameters from standard input, suc as "/bin/ls -l /home/france/Documents", and then passing them to function execute, which at some point calls execvp(argv[0],argv)The problem is that I don't succeed in using these arguments, while if I call execvp(paramList[0],paramList) it works!!!! Where paramList is exactly what I would put on standard input, but defined statically.
Code:
#include<unistd.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
[code].....
I have a vector of octets that needs to be converted to a std string. I'm currently doing it this way:
Code:
stringstream ss;
for (unsigned int i=0; i < data.size(); i++
{
ss << data[i];
}
string s_data = ss.str();
This works, but is there any better way to do it?
Is it not possible to declare a vector inside a C++ class ? Have a look at the following code:
Code:
#include <stdio.h>
#include <iostream>
#include <malloc.h> // malloc
#include <strings.h> // bzero
[code]....
I have two functions:
Quote:
void func1(std::string &s)
{
s.clear();
}
[code]....
Is there a way to create one template function for both vector and string that would clear them?
I am trying to make a simple vector test program, but i can't compile it. Here is the code:
Code:
import java.util.*;
class Vec {
public static void main(String args [ ]) {
[Code]....
i did this code:
reads 1 matrix 2x2 and print!
Code:
# include <stdio.h>
int main()
{
int t, i, M[2][2];
int big[2];
[Code]....
Now i want to create 2 vectors:
1 vector: has the biggest number of every line on the matrix
2 vector: has the lowest number of every column on the matrix
Dear Linux/c++/g++ programmers: the run result on my system, ubuntuLinux10.04(kernel2.6.35-25), gcc4.5.2 is not what book predict
source code
http://examples.oreilly.com/9780596007614/
11-28
11-29
11-24
#include "matrix.hpp"
[Code]...
I'm writing a command-line flash card program in Python. I've tried many existing applications, but none fit my specialized needs.
All of the words I'd like to study are manually added to a text file (study.txt). Each time the software is loaded, it checks for new words in that file and also compares them to a dictionary (a tab-separated file, dictionary.txt), and adds that to a matrix. The flash cards are thus automatically generated from study.txt and dictionary.txt.
Now, the software must manage lots of information about each word I'd like to study and add new information made while interacting with the program (such as when that word should be studied next).
That seems easy to put into a matrix. But what is the best way to put that information in a place where I can pull it back when I run the software tomorrow? Do I need to save the matrix to a CSV file, then convert the CSV file back to a matrix the next time the application is run?
I'm reading about shared, static, and dynamic libraries. What is SDL? Is it static, shared, or dynamic?
I always thought a library would be a lot of .h and .cpp files compiled separately into .o files and then if you compiled your own program you could use the -l parameter to link the library and it was all compiled together. Now I'm not so sure.
I don't even see any SDL .cpp files in my system anywhere. All I have are lots of SDL .h files in /usr/include/SDL and I don't really understand the code in them.
I'm making a wild guess here: SDL is a shared library. SDL itself is NOT compiled into my program, therefore SDL must be on any system my program tries to run on. When I compile and link SDL all it needs is the header files to know what SDL function and objects it can use. And then on every system it uses an already compiled SDL shared library thingy somewhere.
So... where is that part of SDL? All I can find are header files.
I'm thinking the advantage of shared libraries is that someone could say update SDL on their own system and take advantage of the new features without having to download new executables with the new version of SDL compiled into them for every program that uses SDL.
So if I'm making an editor and a game engine and they both use a lot of the same .cpp and .h files that I wrote and I'm tired of updating one and then the other and I need to turn them into a library, then a shared library might be kind of a silly solution. I could just make a static library. Right? Because it's not SDL. Nobody else is ever going to use this library.
This is one of the strangest problems I've run into while programming. Maybe there's just something wrong with my version of gcc or something.
The main problem comes at this point in the code:
Code:
po = makePoFromScorbotXYZPR(X, Y, Z, P, R);
h = makeHB2GFromPo(po);
printf("%le", *h[1][0]); //##################################### Here it has the right value
printf("%s", "
[Code].....
I'm trying to write some code that involves creating a function to return a vector iterator.I'm not sure what is wrong.
Code:
template <typename T> class VectorTemplate
{
[code]....
I need to control matrix 5x4 keypad, on a processor
i am doing by making one row low at a time, and keeping all other rows high,
by scaning coloums, the corresponding key value becomes low.
my problems is that it is taking much time to respond, like to make gpio
low to high and high to low...
I have a 10x2 matrix, I create said matrix and fill it one column with zeros and the other with ones, now when I print the matrix I get this:
column 1:
0,0,0,0,0,0,0,0,1,1
column 2:
1,1,1,1,1,1,1,1,1,1
The first two rows of the second column are being replaced into the last two rows of the first column, now I even checked in visual studio and it works fine there. A friend tried my code and he gets it even worse:
column 1:
0,0,0,0,1,1,1,1,1,1
column 2:
1,1,1,1,1,1,1,1,1,1
As far as I've seen it must be a problem with GCC, unfortunately I need to have this up and running in GCC no matter what.
[Code].....
I have a .txt file with the format
0.01
0.04
0.07
...
0.83
I am wanting to load this into octave and perform operations on the data.
[Code]...
How can we convert a dynamic library (filename.so) to a static library (filename.a) using gnu gcc . Can we get a static library form a dynamic library . I saw a few post in which the conversion form a static library to a dynamic library is mentioned but, unfortunately, not the other way.
View 4 Replies View RelatedI now that there is a an effect that arrange all your windows nicely in a matrix (all windows have the same size). What effect is that?
View 3 Replies View RelatedI upgraded from 9.10 to 10.04 without any visible issues. But after a few days system started to behave strange - first it shows the message that gnome-power-manager is not correctly installed on login screen. The it wasn't able to log in even - so I found that problem might be that it shows not enough space on the root partition.This is really strange for me - I do not have any special data there.
See what I have after df command:
/dev/sda2 9614148 8618864 506908 95% /
none 1024128 360 1023768 1% /dev
[code]...
On kernels from 2.6.27 and further
To speedup the working of all processes as follows:
add to the boot line as grub starts: noirqbalance elevator=cfg
yast2 is more responsif and the processes run on all the cpu's not 3 and 1 as with irqbalance
speedup yast2: export aria2c
result: Gkrellm with a load as little as 5% overall i see all the cpu's working
I dont want to use player like vlc to speedup the playback. I want to actually speedup playback in the original file. Its like I want video to be played 2 times faster.
View 1 Replies View RelatedIn the following code, I am trying to define a matrix in CCS (which is equivalent to CSR for a symmetric matrix, right ?) in ARPACK++.
I have installed and patched ARPACK++. (The matrix is not sparse, but still it should not give an error)
[code]...
Why is this so ? I have checked the values of ia and ja by running intel MKl on the matrix to find the CSR (again, CSR=CCS for symmetric matrix, right ?--I am asking this because ARPACK++ uses CCS, not CSR), and the values are the same. Is this some problem of 0 and 1 indexing ? Does ARPACK++ use 1 indexing?
For what its worth: Probably mentioned someplace but I did not find it.
I am using 11.04 64 with the Classic desktop. I found that dragging windows was terrible rough. Consumed CPU when dragged.
I loaded CompizConfig Settings Manager. Go to the bottom where the 'Work Arounds' are. Enable 'Don't wait for video sync'.
Made a huge difference for me. Able to make it look and work like 10.10 for the most part. But I like a clean old Gnome look and feel.
Q9450, Nvidia 9800GT 512k.
When trying to access "Multimedia" from System Settings, I get an error message as follows:
Code:
Cannot load library /usr/lib/kde4/kcm_phonon.so:(/usr/lib/kde4/kcm_phonon.so undefined symbol: _ZN6Phonon12GlobalConfig28setAudioCaptureDeviceListForENS_8CategoryE5QListiE)Cannot load library /usr/lib/kde4/kcm_phonon.so:(/usr/lib/kde4/kcm_phonon.so undefined symbol: _ZN6Phonon12GlobalConfig28setAudioCaptureDeviceListForENS_8CategoryE5QListiE)
Possible Reasons:
* An error occurred during your last KDE upgrade leaving an orphaned control module
* You have old third party modules lying around.
Check these points carefully and try to remove the module mentioned in the error message. If this fails, consider contacting your distributor or packager. And then when I click OK, it closes, and that's it. how to prevent this, so I can access the multimedia settings and change them. The reason I want to see the settings, is because Amarok 2.3 won't play any songs (even though version 1.4 still works).
How to make simple games (snake, pong... nothing too fancy). I have completed making snake and now want to be able to distribute it. I built it using C++ and wxWidgets so it would be multi-platform. I'm able to compile it and run it in both Windows and Ubuntu using g++. In windows, I was able to distribute it by putting a *.dll file in the same folder as the executable. However in Linux, I don't understand what I need to do so that it would run on any installation of Ubuntu out of the "box". When I build it and try to run it in a different installation of Ubuntu (which has g++) it gives me an error saying that a particular library file was not found and Getlibs fails to find that library file.
Is there a way to build a project with G++ so that all the dependencies are either packaged in the executables or copied into the folder....?
I'm trying to make one that has some sorts in it for now. I know you have to make a header file and a .cpp file. I'm using VC++(yes, I'm in school so windows in needed. I use Ubuntu at home I swear D if it makes a difference. What goes in the header file, how is the cpp file set up, and then where do I put the files once I'm done?
View 5 Replies View Related