‘Collapse All’ in Visual Studio

We have tons of sub-folders in our main client project, and every time you access a file in a sub-folder Visual Studio expands the sub-folder, and given how many files we have in these sub-folders, the scroll bar quickly becomes a tiny dot.

Once their open, there’s no easy way to collapse them all except to go through by hand and manually collapse each one again.

The Visual Studio team gave me the following reply to my suggestion for a “Collapse All”  feature:

Posted by Microsoft on 3/29/2010 at 2:10 PM
Thanks for your feedback. This is a good suggestion and one that we unfortunately cannot incorporate in VS2010. However, here is a macro that should help in the meanwhile:

    Sub UIHierarchy_CollapseTree()
        Dim Hierarchy As UIHierarchy

        'Change Hierarchy to the following line to collapse the active window
        'Hierarchy = DTE.ActiveWindow.Object
        Hierarchy = DTE.Windows.Item(Constants.vsWindowKindSolutionExplorer).Object

        CollapseHierarchyItems(Hierarchy.UIHierarchyItems)
    End Sub
    Sub CollapseHierarchyItems(ByVal HierarchyItems As UIHierarchyItems)
        Dim SubHierarchyItem As UIHierarchyItem
        For Each SubHierarchyItem In HierarchyItems
            CollapseHierarchyItems(SubHierarchyItem.UIHierarchyItems)
            SubHierarchyItem.UIHierarchyItems.Expanded = False
        Next
    End Sub

OpenMP joy from Visual Studio :)

An update from my earlier post, I got a reply to my OpenMP 3.0 ticket, for those of you who don’t have a Windows Live account:

Hopefully that means it’ll be in VS 2010 by release time. Superb.

<3 Visual Studio, yet again :)

Going Parallel

I’ve been looking at OpenMP and Thread Building Blocks. I’ve actually managed to OpenMP one part of the client (which seemed to reduce the “chug” as you move at high speed between large areas of terrain, but didn’t otherwise impact performance, maybe at spawning, I dunno), and a few parts of the cell host (I reorganized the order in which the host prepares vehicles for their world update; the initial part of which is quite thread-safe, and boils down to a simple culling algorithm; on the live servers that should significantly reduce the time the world update dispatch takes, meaning that the data sent to clients is “fresh”er by 5-10 ms under busy load).

My initial understanding of both systems was fairly hazy – I’m trying to run before I can walk, but then the documentation for both starts at a sprint.

The worst mistake I made was misunderstanding their focus: which is algorithmic parallelization.

My Review of Intel Threading Building Blocks

Originally submitted at O’Reilly

More than ever, multithreading is a requirement for good performance of systems with multi-core chips. This guide explains how to maximize the benefits of these processors through a portable C++ library that works on Windows, Linux, Macintosh, and Unix systems. With it, you’ll learn how to u…

Little more than the Intel PDFs

By kfsone from Bedford, TX on 3/30/2010
2out of 5

Cons: Not comprehensive enough, Difficult to understand, Too many errors

Best Uses: Expert

Describe Yourself: Developer

The book mostly consists of slightly-annotated variations of the threadbuildingblocks.com PDFs, albeit slightly easier to read thanks to the O’Reilly layout. But, for example, the parallel_scan description is exactly the same – and just as difficult to comprehend – as that in the “GettingStarted.pdf” over at tbb.

AreWeThereYetAreWeThereYetAreWeThereYet

Oops


// Given a list of vehicles pending an update, eliminate those who
// are not yet ready for an update (not finished spawning, not heard
// from in a while, etc). Also perform all the various discrete,
// preliminary steps that can safely be executed in parallel.
static void _evaluateVehicleCandidates(VEHICLES& vehicles)
{
  // Have as many threads as possible spawn tasks of the
  // workload.
  #pragma omp parallel for schedule(guided) shared(vehicles)
  for ( size_t i = 0 ; i < vehicles.size() ; ++i )
  {
    // Turn each vehicle into a task, since the execution length
    // is variable.
    #pragma omp task firstprivate(i)
    {
      if ( _evaluateCandidate(vehicles[i]) == false )
      vehicles[i] = NULL ;
    }
  }
}

Cpu0: Idle: 99.8%
Cpu1: Idle: 0%

With 0 people on the server. Hmm.

OpenMP dissapointment from Visual Studio

I was going to post my little OpenMP self-tuition examples, but in the process of cleaning them up for public consumption, I discovered that Visual Studio 2010 doesn’t support OpenMP 3.0. Since about half of my examples focus on the use of the task directive for recursion and descent, it’s kinda pointless =/

Oh hai Adobe, thx4hak

http://tech.slashdot.org/story/10/03/26/179248/New-Malware-Overwrites-Software-Updaters

(No, I haven’t been affected)

Terminology #3 (recap)

I wanted to recap with the current terms people have suggested that work for me:

“Diversionary Action” (was Off-side Action)
A formalized action away from Attack Objectives.
“Company”
A player grouping below brigades, with stylized names: Alpha Company, Bravo Company etc;
“Call Up” (was Open)
To register a company so that it is visible to players to join
“Mobilize” (was Activate)
“Mobilized” (was Active)
To achieve pre-requisites that enable spawning and application of the Company.
“Blockade”  (was Neutralize)
Non-capture goal of an Off-side Action which causes an effect such as displacement of brigades.
“Engage”
“Engaged”
One or more players of an Active company has reached the objective and begun the “Blockade” counter.
“Fully Engaged”
A town with one or more Company from each side Engaged.
“War Bond” (was Token)
A virtual unit of currency with finite availability.

Human trials on nano-cancer cure looking good…

http://gizmodo.com/5501103/this-is-the-future-of-the-fight-against-cancer

Terminology #2

Rather than just make this a comment on the previous post, here’s what I put in my official proposal for the squad/companies idea:

“Off-side Action”
A formalized action away from Attack Objectives.
“Company”
A player grouping below brigades, with stylized names: Alpha Company, Bravo Company etc;
“Open”
To register a company so that it is visible to players to join
“Activate”
“Active”
To achieve pre-requisites that enable spawning and application of the Company.
“Neutralize”
Non-capture goal of an Off-side Action which causes an effect such as displacement of brigades.
“Engage”
“Engaged”
One or more players of an Active company has reached the objective and begun the “Neutralization” counter.
“Fully Engaged”
A town with one or more Company from each side Engaged.
“Token”
A virtual unit of currency with finite availability.
I note that Easting has already suggested “Mobilize” instead of “Open” and “Deploy” instead of “Activate”, which I like but Deploy … could conflict with other uses of the same term. You aren’t going to position the unit…