Prefer Futures to Baked-In "Async APIs"
Herb Sutter is a bestselling author and consultant on software development topics, and a software architect at Microsoft. He can be contacted at www.gotw.ca.
Let's say you have an existing synchronous API function:
// Example 1: Original synchronous API // that could take a long time to execute // (to compute, to wait for disk/web, etc.) // RetType DoSomething( InParameters ins, OutParameters outs );
Because DoSomething could take a long time to execute (whether it keeps a CPU core busy or not), and might be independent of other work the caller is doing, naturally the caller might want to execute DoSomething asynchronously. For example, consider calling code like this:
// Example 1, continued:
// Sample calling code
//
void CallerMethod() {
//
result = DoSomething( this, that, outTheOther );
// These could also take a long time
OtherWork();
MoreOtherWork();
// now use result and outOther
}
If OtherWork and MoreOtherWork don't depend on the value of result or other side effects of DoSomething, and if they can correctly run concurrently with DoSomething because they don't conflict by using the same data or resources, then it could be useful to execute DoSomething concurrently with OtherWork/MoreOtherWork.
The question is, how should we enable that? There is a simple and correct answer, but because many interfaces have opted for a more complex answer let's consider that one first.
Concurrency Runtime (CRT): The Resource Manager
Managing processors, memory, and other resources
SIMD Parallism using Array Notation for C/C++
Parallel Composer 2011 brings array expressions to C and C++dBug: A C/C++ Tool for Systematic Evaluation of Distributed Systems
Array Building Blocks: A Flexible Parallel Programming Model for Multicore and Many-Core Architectures
- Quick Evaluation Guide: Locate a Hotspot and Optimize It
- Quick Evaluation Guide: Eliminate Memory Errors and Improve Program Stability
- Quick Evaluation Guides: Optimize an Existing Program by Introducing Parallelism
- Case Study RTT: Driving Automotive Design Innovation, Efficiency, and Cost Savings
- Case Study Sentinelle: Achieving Early and Accurate Detection of Cancer
- Intel Parallel Studio; Download the free eval today!
- Parallelism Breakthrough Video Series; Watch and learn more about Intel® Parallel Studio
- 2009 Intel Software Webinar Series; View On-Demand webinars
- Coding for Multi-core Processes; Intel® Compiler Pro eBook
- Performance Through Parallelism; Intel® Tuning for Vista eBook
- Intel® Software Network; Connect with developers and Intel engineers
-
September 13, 2010
The goal of the Third International Workshop on Parallel Programming Models and Systems Software for High-End Computing is to bring together researchers and practitioners in parallel programming models and systems software for high-end computing architectures. Please join us in a discussion of new ideas, experiences, and the latest trends in these areas at the workshop.
Parallel Architectures and Compilation Techniques
-
September 11-15, 2010
The International Conference on Parallel Architectures and Compilation Techniques (PACT) is a premier international forum for the presentation of research results in parallel computing. As a multi-disciplinary conference that brings together researchers from the hardware and software areas, PACT brings together researchers and practitioners in parallel systems to present ground-breaking research related to parallel systems ranging across instruction-level parallelism, thread-level parallelism, multiprocessor parallelism and large scale systems.
IDF2010
-
September 13-15, 2010
The Intel Developer Forum 2010 is your opportunity to collaborate with thousands of key industry players. Hear from more than 150 leading technology companies from around the world. Ask questions, get answers, experience live demonstrations, and more. Between the highly informative Keynotes, Technology and Industry Insights, Intel Fellows Live & Uncensored and Technical Sessions (including lectures, interactive panels, hands-on labs and Hot Topic Q&As), this year's IDF has everything you need to stay on top of the latest technology trends.
-
February 12-16, 2011
The Symposium on Principles and Practice of Parallel Programming is a forum for leading work on all aspects of parallel programming, including foundational and theoretical aspects, techniques, tools, and practical experiences. In the context of the symposium, "parallel programming" encompasses work on concurrent and parallel systems (multicore, multithreaded, heterogeneous, clustered systems, distributed systems, and large scale machines). Given the rise of parallel architectures into the consumer market (desktops, laptops, and mobile devices), PPoPP is particularly interested in work that addresses new parallel workloads, techniques and tools that attempt to improve the productivity of parallel programming, and work towards improved synergy with such emerging architectures.


