Problem with Atomic operations on a intel XScale(ARM) processor - XScale-IXP42x Family - c++ [closed] - c++

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
We are facing a possible problem on ARM processor machine.
We have done an implementation for smart pointers,which involves atomic operation for keeping track of the references.
We are getting crashes for that.
Is there a possible problem with atomic operations on ARM processor?

It's possible, but it's way more likely that there is a bug in your code.
Perhaps you should post some code.

Related

Lockless vector [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I recently got interested in lockless programming and attempted to write implement a fixed-size mostly-lockless vector (github link). While it works, I'd love to get some feedback from more experienced people if my logic looks buggy or suspicious.
Are there any standard techniques that are particularly useful when testing out lockless data structures?
std::vector is lockless. In general, any good vector implementation will be lockless, because the granularity of a vector is too low for locks to be of any use.

Is performance affected if multiple threads use the same object? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
The object in this case is a dictionary with some search methods. Only reading operations.
Quick answer: No.
Quite the opposite, it will speed up your program, especially if you have an object that needs to load a lot of data into memory.
Just make sure nothing can write to the object while the threads run.

What are C++11 atomic classes? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I would like to know what are "C++11 atomic classes" that GCC-4.7.2 talks of in the 4.7 changelog. I have tried Googling but didn't get any useful information on this. Does this mean that all operations are atomic so the class is thread-safe and operations are linearizable?
To quote from this reference:
The atomic library provides components for fine-grained atomic operations allowing for lockless concurrent programming.
So in short yes all operations on an atomic variable are, well, atomic, and therefore threadsafe.

CPU caches aware C++ / C programming [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I was going through Scott Meyer's podcast on CPU CACHES AND WHY YOU CARE It seems this will make code run faster, is there any open source where such coding is done for reference.
Or anybody has example of design of data structures/algorithms based on CPU caches aware
Sure, the entire Linux kernel is implemented to be cache-aware.
For more details there is highly recommended paper What Every Programmer Should Know About Memory.
Linear algebra is sensitive to cache problems. The BLAS subroutines allow one to abstract away from these concerns

Multiple inheritance in C++ [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
As you know, C++ allows multiple inheritance. But, would it be a good programming approach to use multiple inheritance or it should be avoided?
Thanks.
In general, it's not needed and can make your code more complex.
But there are cases where it's useful. As long as it's useful and isn't causing your code to become unmanageable, I see no reason to avoid it.