|
I was thinking today that it should be relatively easy to implement lock free data structures using Thread Local Storage but surprisingly Google didn't reveal anything that really stood out or even a library of basic data structures that have been built using this.
Is there something I am missing?
I always think that the idea of a compiler that compiles another compiler or itself is rather incestuous in a binary way. - Colin Davies
My .Net Blog
|
|
|
|
|
Hi,
thread local storage offers storage that is private to the thread.
When threads cooperate, they have to share data; thread local data does not help here,
it prevents sharing.
To share data safely most often one needs a synchronization mechanism; a lock is one
example thereof.
|
|
|
|
|
Of course, thanks for clearing that up
I always think that the idea of a compiler that compiles another compiler or itself is rather incestuous in a binary way. - Colin Davies
My Blog
|
|
|
|
|
Sijin wrote: Lock free data structures
There are many lock free algorithms, unfortunately most are patented. But as pointed out local storage comes off the thread's private memory storage and is by definition "local" only to that thread and cannot be shared.
I keep debating on writing something for this, and have been encouraged to do so.... started once, but it is not as easy concept as it sounds. It gets complicated real quick.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
Mind you -- that most are patented it a great thing -- you can read exactly how it is done. www.uspto.gov or patents.google.com. I'm not advocating IP theft, but the constitutional point of the patent system is to exchange temporary monopoly for full public disclosure. The best parts of a patent for non-lawyers is the background and following 'spec' (specification).
Good luck,
spin-vec
|
|
|
|
|
spin vector wrote: you can read exactly how it is done.
I am quite familiar with how it is done. I was pointing out that most algorithms are patented, as both a warning, and information since as you pointed out they all can be searched online. What someone chooses to do with that information, learn, use, or find another way is up to them.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
I am trying to understand the Math of a Camera in Computer Graphics.
Here is the question
If i have a camera a point a, How do I compute the view matrix so the camera looks at point b?
|
|
|
|
|
javascript:ol('http://www.codeproject.com/article.asp?tag=22254790602739235');
Any help here, just read it an hour ago and it came to mind, sorry if its out in left field.
|
|
|
|
|
Could anyone write a function in mathematica to do the same with the following program?
main(){
char s[300],t[300];
int i,j,c,m,n,edit;
int a[301][301];
m=strlen(s);
n=strlen(t);
if(n==0){printf("Edit distance = %d\n",m); }
if(m==0){printf("Edit distance = %d\n",n);}
else{
for(i=0;i<=m;i++){
a[i][0]=i; }
for(j=1;j<=n;j++){
a[0][j]=j; }
for(i=1;i<=m;i++){
for(j=1;j<=n;j++){
if(s[i-1]==t[j-1])
c=0;
else c=1;
a[i][j]=min(a[i-1][j]+1,min(a[i][j-1]+1,a[i-1][j-1]+c));
edit=a[i][j];
}
}
printf("\nEdit distance = %d\n\n",edit);
}
}
|
|
|
|
|
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi
I am working on Speech Recognition using microsoft speech SDK 5.1 (SAPI 5,1). I wish to implement two different speech recognition engine in one application. The problem is that when I create one engine, the other can not be created in shared mode. However if I create the two in In proc recognizers, the recognition does not work. What can be the possible solution to implement to recognizers in one application specially when the two have different languages.
Regards
Zia
|
|
|
|
|
How is the project doing?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I’m very pleased to announce that Foundations of F#, the first book to be published on the F# programming, will finish its first printing run, tomorrow, Friday 25th May. It should reach any pre-order customers between 5 to 10 days later, meaning if ordered it on Amazon or Borders (or any other online store), it should be with you before the end of May. A few weeks after that it should start appearing in books stores, at least bookstores that have very big tech departments.
F# is a functional programming language implemented on the .NET framework. F# blends nice the paradigms of functional programming with those imperative and object oriented programming. Allowing you to write functional programs that allows take advantage of the huge range of libraries that exist in the .NET framework. Plus F# includes a “top-level”, that has also been integrated into visual studio, allowing you to select sections of your code and execute them dynamically.
So what are you waiting for? Order a copy today, if you haven’t already:
http://www.amazon.com/dp/1590597575?tag=strangelights-20&camp=14573&creative=327641&linkCode=as1&creativeASIN=1590597575&adid=0F4QKB6A95B2Z4NW1BFN
Foundations of F# is the first of several books on the F# programming language, which include Expert F# and F# for Scientist.
http://www.amazon.com/Expert-F-Don-Syme/dp/1590598504/ref=sr_1_2/102-5305736-3745759?ie=UTF8&s=books&qid=1179999013&sr=1-2
http://www.ffconsultancy.com/products/fsharp_for_scientists/index.html
You can find out more about F# itself by visiting the official F# site of “the hubfs” a community site for F# users.
http://research.microsoft.com/fsharp/fsharp.aspx
http://cs.hubfs.net/
--
Robert
http://www.strangelights.com
|
|
|
|
|
Don't advertise.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
hi there,
in my app i have to calculate a value using this syntax:
x = 2^(y / 2)
but ^ ist a logical operator in c#. what could be meant? how would i calculate x if, for example y = 4,33984375? or does ^ have a different meaning in this context (for example Math.Pow?).
does anyone possibly understand what i'm after? any help is greatly appreciated.
/matthias
I love deadlines. I like the whooshing sound they make as they fly by. [Douglas Adams]
|
|
|
|
|
matthias s. wrote: x = 2^(y / 2)
To what context your expression belong?
I mean, if it is a Visual Basic (VB6) one, then it translates to the following C# equivalent:
x = Math.Pow(2, y / 2);
On the other hand, if the context is C#, it simply doesn't make sense.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Hi,
Even I am not sure, what you want to achieve with that operator, but "^" is a logical exclusive - OR for binary type. Meaning the result will be true only if only one of the operand is true.
"^" for the integral types (as above in your case) computes bitwise exclusive-OR of its operand. hence it will compare the each bit and apply exclusive-OR on each bits to find the last result.
Manoj
Never Gives up
|
|
|
|
|
Manoj Kumar Rai wrote: but "^" is a logical exclusive - OR for binary type.
Actually for single bits.
Manoj Kumar Rai wrote: "^" for the integral types (as above in your case) computes bitwise exclusive-OR of its operand. hence it will compare the each bit and apply exclusive-OR on each bits to find the last result.
He asked about doubles!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
I expect that Math.Pow is what you want, but in some organizations you can get in trouble for thinking, so use the statement as told and shrug your shoulders when someone reports a bug.
|
|
|
|
|
Hi Matthias,
Try **. Just kidding
Jeff
|
|
|
|
|
Hey folks,
I've got a simple question:
What's your favorite Math-Library (besides Math.h
I need a really good math-library which has FFT and SVD and a bunge of other stuff...
*I tried JAMA, which is not too bad, but has too few functions for me
*Matpack (surely a great Library but I only get errors when trying to compile)
(www.matpack.de - maybe someone can help me get this running)
*I even tried copying (well, more like typing from) "Numerical recipes in C" and even those ended in an endless loop when trying to do an svd.
any suggestions?
|
|
|
|
|
|
I don't know what your detailed requirements are, there is no gold standard of which I am aware. Recently I have been using Intel MKL - this has impressive FFT performance, haven't used SVD yet. For freeware FFT, FFTW is probably the best. I have used IMSL but it is expensive, and I have a query in my mind over licensing for use in products. For free linear algebra you could consider getting a fortran compiler and compiling the NETLIB routines you want into a library.
Peter
"Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."
|
|
|
|
|
how about Blitz its gives you matlab like capabilities for C++
here is the link: http://www.oonumerics.org/blitz/
|
|
|
|
|
I'm on the same hunt for other reasons. Blitz looks good but even it seems to rely on the IEEE 754:1985 approx implementation built into the C Runtime . Do you know of any indepenent IEEE/libm implementation in C++?
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|