sierpień 2009

Crysis na wbudowanej karcie graficznej?
Pewnie tak to będzie wyglądać za jakiś czas. Na telewizorze albo tanim komputerku (ale z mocną siecią) grasz z pewnym lagiem na grach z dowolnej platformy.

Cytat:
In concurrent programming, a monitor is an object intended to be used safely by more than one thread. The defining characteristic of a monitor is that its methods are executed with mutual exclusion. That is, at each point in time, at most one thread may be executing any of its methods. This mutual exclusion greatly simplifies reasoning about the implementation of monitors compared with code that may be executed in parallel.

http://en.wikipedia.org/wiki/Monitor_%28synchronization%29

Poluje na pojemnik dający się bezproblemowo używać w programie wielowątkowym. Musi spełniać następujące parametry:

  • template'owy
  • nieblokujące dodawanie, złożoność najwyżej O(logN), najlepiej O(1)
  • nieblokujące kasowanie, złożoność nahwyżej O(n), najlepiej O(1)
  • możliwość iterowania po aktualnym "snapshocie" kolekcji

Czyli coś w rodzaju garbage collector'a z lepszą możliwością iteracji.

Cytat:
A common programming task is to remove all elements that have a certain value or fulfill a certain criteria from a collection. In C++, this could be achieved using a hand-written loop. It is, however, preferred to use an algorithm from the C++ Standard Library for such tasks.

The algorithms library provides the remove and remove_if algorithms for this. Because these algorithms operate on a range of elements denoted by two forward iterators, they have no knowledge of the underlying container or collection. Thus, the elements are not actually removed from the range, merely moved to the end. When all the removed elements are at the end of the range, remove returns an iterator pointing one past the last unremoved element.

http://en.wikipedia.org/wiki/Erase-remove_idiom

http://www.ddj.com/go-parallel/article/showArticle.jhtml?articleID=219200099

Kategorie:

Cytat:
What does naive programmer think about it? Hmmm... Let's see... I use "fast" non-blocking interlocked operations. Good!... Hmmm... False sharing. Let's see... Hmmm... Here is no false sharing. Good! So my program fully conforms to recommendations of experts.

Rubbish! It's a dead-slow, completely non-scalable program.

http://software.intel.com/en-us/blogs/2008/10/09/eliminate-false-sharing-wrong/