2015年6月30日 星期二

DevOps: Our Journey to the Cloud Cadence, Lessons Learned at Microsoft Developer Division

DevOps: Our Journey to the Cloud Cadence, Lessons Learned at Microsoft Developer Division

Microsoft Developer Division learned many lessons as the company became a SaaS provider supporting continuous cloud delivery. Download this short eBook to learn about the company’s DevOps engineering practices and tools.

Take Innovative Ideas Rapidly from Prototype to Production

Take Innovative Ideas Rapidly from Prototype to Production
Now you can rapidly prototype and test ideas for IoT solutions — then scale deployment with security and manageability.
With the expanded Intel® IoT Developer Program for Commercial Solutions and the Intel® IoT Dev Kit, professional developers can rapidly take innovative ideas from prototype to production. Read our blog to get an overview.

How to Offload Your Code to Your GPU

How to Offload Your Code to Your GPU
Most desktop computers have video cards with multiple processor cores that support advanced graphics. But most of the time they are idle, just waiting for a graphically intense program to run. But there is an easy way to take advantage of the extra cores on graphics cards. Rick Leinecker shows you how. Take a look and let us know what you think in the comments section on our story page.

2015年6月24日 星期三

微礦 WeMine x BQ Journal 聯合推出微信公眾號應用培訓課程

微礦 WeMine x BQ Journal 聯合推出
微信公眾號應用培訓課程
 很多香港企業都 開始留意到微信對內地營銷的重要性,但微信與其他社交平台有著重大分別,如何利用微信公眾號才可以吸引粉絲及獲取有效 ROI?

2015年6月11日 星期四

Take an early look at new tools for protecting info in Exchange, SharePoint, and beyond

Take an early look at new tools for protecting info in Exchange, SharePoint, and beyond

The latest episode of Office Mechanics features a demonstration of new security policies across email, SharePoint, IM, and Skype for Business, as well as info protection policies that go beyond the cloud and DLP that goes beyond email.

2015年6月6日 星期六

Windows 10 即將要推出了

Windows 10 即將要推出了
微軟正作好準備推出有史以來準備期最短的一個重要新 Windows 版本。微軟的目標是在推出兩年內達到 10 億個裝置使用 Windows 10 的目標!
讓您的應用程式準備好在 Windows 10 執行
現在正是開始測試您的應用程式在 Windows 10 執行的最佳時機,所有該考慮到的 RAD Studio XE8 都幫您考慮到了。
新的 Windows 10 VCL 型態

2015年6月2日 星期二

5 Tips for Speeding Up Your Code Using TBB

5 Tips for Speeding Up Your Code Using TBBShare your comment!

Intel Threading Building Blocks is a library to help your application use parallelization without you having learn all the subtleties of threading and to avoid the pitfalls. If you use TBB to speed up your software, below are a few tips to help you on your way.

You don’t always need a blocked_range

A blocked_range in TBB is a template class that’s used to divide (recursively) an array or range of data into smaller pieces so that TBB can then process each piece concurrently. However, you can use TBB to control how the division is done. You have to provide a simple class D that implements these methods:
  • bool empty() const;
  • bool is_divisible() const;
  • D (D & d, split);
The empty() function returns true if the range is empty, while is_divisible() returns true if the range can be split into two non-empty sub-ranges. The constructor D has a parameter d of type D and a constant of type tbb::split. After splitting the range into two roughly half ranges, d refers to the first half and the constructed object instance to the second half.
The advantages of this are that you’re free to partition the range as you choose. For example, if you are processing image data, then a 2D array of pixels could be processed.

Use parallel_do

The traditional do_while loop has never been what you’d call a popular construct compared to while and for loops. In my opinion the do_while loop was a design mistake in C, C++ and other C related languages. If you compare do_while to Pascal’s Repeat_Until, both are similar and run the statement at least once then check loop termination at the end. however repeat-until(done) terminates in the more logical but opposite sense to do_while(!done) and I think repeat_until is clearer. Especially as in northern England the word while is sometimes used to mean until! “He were there while 11:00 pm”.
In TBB, you can a tbb::parallel_do when the loop terminating condition isn’t predetermined as it would be with a tbb::parallel_for. An additional advantage of parallel_do is that a second parameter of type parallel_do_feeder can be used to add additional work items.

Use Concurrent Containers

The C++ STL containers are broadly thread safe. Simultaneous reads of the same object are safe and simultaneous writes of different objects. Simultaneous writes to the same objects will however probably cause data races and lead to corruption of the STL container.
But Intel TBB to the rescue. It provides several concurrent container template classes, specifically concurrent_hash_map, concurrent_vector and concurrent_queues. Locking is done only on the part of the container is needed but this means that overall performance is a bit slower than STL containers so only use these if a speedup is likely.

Avoid false sharing with cache_aligned_allocator

False sharing is where two or more processes access the same shared memory cache line at the same time. Modern processors read data from memory not just a byte, word or quadword at a time but in a fixed size block called a cache line. When false sharing occurs, reading data into a cache line causes the other processor’s cache line data to become stale and it requires a refresh which diminishes performance.
Intel TBB provides two allocator templates classes similar to std::allocator. If your program does a lot of memory allocation then you would use the scalable_allocator, but to avoid false sharing you’d instead use the cache_aligned_allocator. Two objects allocated by this are guaranteed not to have false sharing.

Use Tasks Not Threads

In the .NET world, the Task Parallel Library has made multi-tasking a lot simpler than managing threads and with Intel TBB you have the equivalent for C++. Thread programming can be messy and very easy to get wrong. If you develop tasks instead then you let the task scheduler allocates tasks to threads, and tasks start up can be up to 100x faster than threads on Windows.
It’s worth reading the Catalog of Recommended task patterns to understand how best to use tasks.

Conclusion

Hopefully, these tips will give you a flavor of TBB’s power and how you can get the most out of it.