Abstract:
Methods and devices for optimizing classification tree evaluation for online and real-time characterization of tissue by using GPUs are disclosed that give a significant improvement in run time compared to data decomposition. The methods and devices use a parallel algorithm designed for single instruction, multiple data (SIMD) architectures commonly found in GPUs. Various optimizations and their effects are also disclosed.

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
       [0001]    The present application claims priority to and the benefit of U.S. Provisional Patent Application No. 61/524,705, filed Aug. 17, 2011, which is hereby incorporated by reference in its entirety. 
     
    
     FIELD 
       [0002]    The present disclosure relates generally to the field of tissue characterization used to diagnose and treat maladies in humans and more specifically to tissue characterization used in conjunction with in intravascular ultrasound (IVUS) or optical coherence tomography (OCT) systems. 
       BACKGROUND 
       [0003]    Methods and systems for characterizing tissue including tissue types within tissue are known (See, for example, U.S. Pat. Nos. 6,200,268; 6,381,350; 7,074,188; 7,175,597; 7,215,802; 7,359,554; 7,463,759; 7,627,156; 7,789,834; 7,874,990; 7,899,224; 7,927,275; 7,940,969; and 7,978,916; each of which is hereby incorporated by reference in its entirety). In these previous methods and systems, tissue is scanned with an imaging device, (e.g., an intravascular ultrasound (IVUS) or optical coherence tomography (OCT) device) and backscatter signal data is collected. Histology images are prepared and digitized which correspond to the scanned vascular sections. A tissue type is selected on the histology image and its coordinates are mapped to a corresponding location on the IVUS or OCT image constructed from the backscatter signal. The image location is then translated to the corresponding signal section of the raw backscatter signal. Frequency analysis is performed on the signal section to determine its signal properties. The signal properties are correlated to the selected tissue type of the histology image and stored in a tissue characterization database. The process is then repeated for all tissue types and other tissue types found within tissue and stored in the database. The components of tissue such as tissue can be identified directly from the raw backscatter signal by matching its signal properties with the signal properties of the database, thus, identifying tissue types or other tissue components in vivo and in real-time. 
         [0004]    Classification trees are used to solve problems in areas as diverse as target marketing, fraud detection, pattern recognition, computer vision, and medical diagnosis. In many applications, classification trees are carefully designed once but then applied to many data sets to provide automated classifications. This approach is used to create validated classifiers for tissue classification in mammography and intravascular ultrasound diagnostic procedures. While training the classifier is done offline, tree evaluation of each patient&#39;s data in these applications is an on-line algorithm where a user waits for a classification to be performed on many, many samples. Time spent waiting for this evaluation consumes valuable procedure room equipment and personnel. Performance requirements only increase when single images are replaced by moving video for computer vision applications, as in robotic navigation. In this environment, many classifications are needed in real-time to compute and affect a timely response. Thus the need for high-performance on-line evaluation of classification trees ranges from beneficial to absolutely necessary. 
       SUMMARY 
       [0005]    Methods and devices for optimizing classification tree evaluation for online and real-time characterization of tissue using GPUs are disclosed that give a significant improvement in run time compared to data decomposition. The methods and devices use an approach to tree evaluation on massively parallel GPU architectures, namely CUDA, for virtual histology processing in an IVUS or OCT imaging system. In that regard, the IVUS or OCT imaging system typically includes an intravascular device (e.g., guide wire or catheter) sized and shaped for insertion into human vessels, such as the vasculature, and a processing system in communication with the intravascular device for processing data obtained by imaging element(s) of the intravascular device (e.g., an ultrasound transducer, ultrasound transducer array, OCT imaging element, etc.). The methods and devices of the present disclosure may be implemented in a wide variety of IVUS and OCT imaging systems, including those disclosed in U.S. Pat. Nos. 6,200,268; 6,381,350; 7,074,188; 7,175,597; 7,215,802; 7,359,554; 7,463,759; 7,627,156; 7,789,834; 7,874,990; 7,899,224; 7,927,275; 7,929,148; 7,940,969; and 7,978,916; and U.S. Patent Application Publication Nos. 2010/0220334; 2009/0043191; and 2009/0093980; each of which is hereby incorporated by reference in its entirety. The methods and devices use a parallel algorithm designed for single instruction, multiple data (SIMD) architectures commonly found in GPUs. Various optimizations and their effects are also disclosed. 
         [0006]    Rather than treating the full evaluation of one sample as the atomic parallel task, we parallelize the evaluation of each node in the tree for a single sample then reduce the resulting path through the tree in parallel. This approach has some performance benefits on architectures where execution of parallel processors is not independent, as in SIMD machines. When the approach of the present disclosure is compared to the data decomposition used in previous work and to the best-known serial host algorithm, in the specific environment we examine, results for the decomposition method of the present disclosure show a 25% performance improvement over data decomposition. We also see that host memory bandwidth and data distribution is an important measurement consideration that can dominate the nuances of GPU performance gains in typical PC systems, and must be accounted for in any statement of speedup results. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0007]    Embodiments of the present disclosure will be described hereafter in detail with particular reference to the drawings. Throughout this description, like elements, in whatever embodiment described, refer to common elements wherever referred to and referenced by the same reference number. The characteristics, attributes, functions, interrelations ascribed to a particular element in one location apply to that elements when referred to by the same reference number in another location unless specifically stated otherwise. All Figures are drawn for ease of explanation of the basic teachings of the present disclosure only; the extensions of the Figures with respect to number, position, relationship and dimensions of the parts to form the preferred embodiment will be explained or will be within the skill of the art after the following description has been read and understood. Further, the exact dimensions and dimensional proportions to conform to specific force, weight, strength and similar requirements will likewise be within the skill of the art after the following description has been read and understood. 
           [0008]      FIG. 1  is a schematic view of a streaming microprocessor capable of running the method of the present disclosure. 
           [0009]      FIG. 2  is a diagram showing parallel tree path reduction. 
           [0010]      FIG. 3  is a diagram showing an experimental classification tree according to the present disclosure. 
           [0011]      FIG. 4  is a time summary plot showing the average timings taken by CUDA runtime over 500 executions (μs). 
       
    
    
     DETAILED DESCRIPTION 
       [0012]    In utilizing classification trees, the assignment of a class to a given sample from a dataset requires that the sample be evaluated at each decision point along its path from the root of the tree to its eventual terminal leaf. While it may seem that each decision must be made in series for that sample, we note that each sample&#39;s classification is independent of all other samples. This allows us to decompose the problem of classifying all samples in a dataset into the independent problems of classifying each sample, which can be done in parallel. This decomposition according to sample data (a data decomposition approach) makes a growing number of parallel computing architectures available to speedup tree evaluation. 
         [0013]    There is a good deal of literature on parallelization of training algorithms used to create classification trees in a traditional parallel processing setting. Research on the tree evaluation problem, however, focuses on Graphics Processing Units (GPUs) as the implementation platform. GPUs are typically designed specifically for data parallel applications. As inexpensive, commodity hardware found on every standard PC, GPUs match the cost, size, and power requirements of the on-line tree evaluation problem setting more closely than traditional super computers. Such application of graphics hardware to generic problems has become known as General Purpose GPU (GPOPU) computing. 
         [0014]    Initial attempts to apply GPGPU techniques to tree evaluation stored the tree as an array of nodes containing the decision criteria of that node and an index used to locate the next node. Subsequent node indices were computed without conditional branches to avoid their heavy performance penalties on most GPUs. The tree definition was passed to the GPU as a texture map used by a custom pixel shader. The shader consumed input feature data and combined it with the texture to produce a final value, the assigned class, for each pixel in parallel. This can be extended to evaluate random forests by concatenating multiple tree structures in the texture data and iterating over all trees. 
         [0015]    Classification Trees 
         [0016]    In evaluating a classification tree, we are given a set of records, called the dataset, and a full binary decision tree, called the classifier. Each record in the dataset contains several fields, called attributes or features. One of the attributes, the classifying attribute, indicates to which class the record belongs and is unknown. In the general case, attributes can be continuous, having (real) numerical values from an ordered domain, or categorical, representing values from an unordered set. The classifier is a predictive model created through a process known as training. In training, observations on a training set of records, each having a known classifying attribute, are used to build a tree such that each interior, or, decision, node uses a single attribute value test to partition the set of records recursively until the subset of records at a given node have a uniform class. Such nodes are encoded in the tree as leaf nodes. The evaluation of a dataset is complete when the trained classifier is used to determine to which leaf, and thereby which class, each record belongs. 
         [0017]    There are several training algorithms for examining attributes and generating trees known to those skilled in the art. Accordingly, the particular algorithm used will not concern us here, so long as the resulting tree has the above properties. We examine trees where all attributes are continuous, a common occurrence in image segmentation. While we will look at real-valued attributes (approximated with floating point numbers), ordered discrete values behave very much the same. Categorical attributes require some modifications to the approach described herein, as would be understood by one skilled in the art. We will further assume that class values can be enumerated and put into one-to-one correspondence with the natural numbers. Evaluation will operate only on numbers, and any mapping to another representation for class values (e.g. to descriptive strings or pixel values) will be done outside the evaluation process. 
         [0018]    CUDA GPUs 
         [0019]    GPGPU computing has grown in popularity in recent years as a technique for improving performance for massively parallel applications, especially where visualization and images are concerned. Initially, generic parallel computing was achieved on GPUs by cleverly mapping the processing into the graphics domain using libraries such as OpenGL to perform primitive tasks. As demand for customized graphics processing grew, vendors began supporting domain-specific programming languages like GL Shading Language (GLSL), making the GPU&#39;s floating point units more available. 
         [0020]    In recent years, GPGPU computing frameworks have made great strides in removing assumptions about the domain and providing a generic capability to be used in any application needing massive parallelization. Perhaps the leading such framework, NVIDIA&#39;s CUDA architecture, can add tens or hundreds of GigaFLOPs to a system&#39;s capability on a single adapter card. 
         [0021]    This power can be brought to bear on generic problems with great ease of use. The programming environments for these devices, whether vendor-specific or the industry standard OpenCL, can be used with no reference to the graphics domain. These environments subset the C/C++ 2  programming language and provide a set of keyword extensions to manage the generation of both device-specific code and host code from the same source file set. In this way, code written to run on the GPU, called a kernel, is invoked with something that feels very akin to a C function call. 
         [0022]    CUDA Programming Model 
         [0023]    The CUDA runtime executes kernels across many threads, or individual streams of instructions (usually for a single atomic parallel task), and manages the mechanics of scheduling in hardware. Threads are grouped into blocks as 1, 2, or 3 dimensional arrays with each thread having a unique identifying index in each dimension of the block. Further, blocks are grouped into a 1 or 2 dimensional grid, with each block again having an identifying index in the grid dimensions. Each kernel invocation is done over a single grid and gives the grid and block dimensions to use when launched. Threads within a block are allowed to synchronize and share memory, but no communication between blocks is allowed. Threads are scheduled and executed in 32-thread units called a warp, with some operations happening on a half-warp, or 16 threads. All threads have access to their local memory (registers and stack), the shared memory of their block, and a global memory common to the entire device. The host can read from and write data to global memory but not local or shared memory. The host is required to copy kernel input and output data to and from device global memory outside of the kernel execution. 
         [0024]    A simple example helps to illustrate a typical kernel invocation. First, the host CPU copies the input data to the GPU device&#39;s global memory. Since the host and device address spaces are separate, the CUDA runtime provides the host with APIs to allocate storage in device space, copy memory between spaces, look up device space symbol addresses, etc. The host must also allocate device global memory to store the results of the computation. The host can then invoke the CUDA runtime to launch the kernel with certain grid and block dimensions. Arguments such as the input and output buffers in device space are passed in the invocation. The device allocates execution resources to the kernel grid and schedules threads to execute in warps. Each thread uses its block and thread indices to identify its associated portions of input and output data. It can then do thread-specific memory transfer to its own stack and registers. Once the input data is locally available, computation is done and output is stored in device global memory. When all threads have completed, the host is signaled and is then free to copy the results from device to host memory and deallocate buffers. 
         [0025]    CUDA Hardware Architecture 
         [0026]    While an extensive discussion of CUDA architecture is unnecessary for one skilled in the art to understand and implement the embodiments of the present disclosure, some of the algorithm designs given herein are driven by certain qualities which bear discussion. The fundamental execution units of a CUDA device, called stream processors and known as cores, are arranged in N-way SIMD groups for some implementation-dependent N (usually 8, 32, or 48). These groups are combined with super function units (SFUs), instruction cache/decode logic, a register file, LI cache/shared memory, (usually 2) warp schedulers, and a network interconnect to form a streaming multiprocessor, or SM ( FIG. 1 ). All threads in a block will be executed on the same SM, scheduled very efficiently by the hardware warp schedulers. When a warp is scheduled, all threads in that warp execute the same instruction, but have their own registers and stack. When some threads take conditional branches different from other threads, the warp executes the two paths in series until the paths merge. This is known as a divergent path, and can affect the kernel&#39;s performance substantially. 
         [0027]    When a warp encounters a long-latency instruction (such as global memory access) it can be swapped for another warp in a small number of clocks. There is a limit to this capability, however, and the SM can only have so many blocks and threads resident at a time. This concept is known as occupancy, and can also affect the kernel&#39;s performance. Low occupancy means an SM has nothing to do during long latency instructions, so the SM is not fully utilized. 
         [0028]    Finally, accessing global memory from an SM is an expensive operation, typically 100 times the cost of accessing local memory. In some CUDA implementations, accesses to global memory that meet certain requirements (such as contiguous access of 32, 64, or 128 bytes made in order by each core) can be coalesced into a single read, improving throughput. Later versions of CUDA hardware add L1 and even L2 cache, which mitigates the cost of non-coalesced reads. 
         [0029]    Classification Tree Algorithms 
         [0030]    The algorithm of the present disclosure is applied to virtual histology systems to correlate the backscatter data to known tissue types. It is natural to imagine an algorithm for evaluating a decision tree using a binary tree data structure and a depth-first traversal which, at each node, uses a conditional to evaluate whether the traversal should follow the left or right child of the node. Conditional statements, however, present problems for traditional CPUs (in the form of branch misprediction and pipeline flush) and GPUs (in the form of serialized divergent paths for SIMD warp execution.) This problem can be avoided by using a branchless tree traversal. In the present disclosure, branchless tree traversal is utilized for the base serial evaluation algorithm in some instances. A host implementation of this algorithm, as the best known serial algorithm, will be the reference by which speedup of parallel algorithms is determined. 
         [0031]    Branchless Tree Evaluation 
         [0032]    The evaluation problem can be stated as follow: given a dataset          ={R:R=(r 1 , . . . , r A ), r a ∈         } with |         |=M and a full binary classification tree τ with a set of nodes          ={n: n=(o n , t n , d n   r , d n   l , c n )} where:
       |         |=N is the number of nodes in τ   1≦o n ≦A is the index of attribute r a     n    in each record R to be evaluated by node n   t n ∈          is the threshold for attribute r a     n    is used by node n   d n   l ∈{         ∪Φ} is n&#39;s left descendant and recursively evaluates R when r a     n   ≦t n      d n   r ∈{         ∪Φ} is n&#39;s right descendant and recursively evaluates R when r a     n   ≦t n      c n ∈{C∪⊥: C⊂         s the set of possible class values} is ⊥ when (d n   r ≠Φ         d n   l ≠Φ) or some c∈C when (d n   r =Φ         d n   l =Φ)
 
and having a root node n 0 , assign to each R∈          a c R ∈C by recursively evaluating R beginning at n 0 .
       
 
         [0039]    To evaluate t without branching, we first encode N in a breadth-first array of nodes. 
         [0040]    Procedure 1 shows how each node is assigned an index i in the array breadthFirstTree to create a data structure describing the tree. Note that every right child has an index that is one more than the neighboring left child. Each node, then, need only store the index of its left child. To compute the index of the next node to evaluate, the node compares its attribute value r, against its threshold t, using the Boolean predicate “greater-than.” If the result is false and encoded as 0, adding the result to the node&#39;s child index will yield the index of its left child, as desired. If the result is true encoded as a 1, adding it to the child index will yield the node&#39;s right child&#39;s index. While not strictly branchless due to the while loop, this technique does avoid any explicit conditional to compute the path to take at each decision node. The general algorithm is shown in Procedure 2. 
         [0000]    
       
         
               
             
               
               
               
             
               
               
               
             
               
               
               
             
               
               
               
             
               
               
               
             
           
               
                   
               
               
                 Procedure 1 Breadth-first Encoding of Tree 
               
               
                   
               
             
             
               
                   
               
             
          
           
               
                   
                  1: 
                 breadthFirstTree= [ ] 
               
               
                   
                  2: 
                 Q=queue( ) 
               
               
                   
                  3: 
                 push(Q, n 0 ) 
               
               
                   
                  4: 
                 i= 0 
               
               
                   
                  5: 
                 childIndex= 1 
               
               
                   
                  6: 
                 while Q not empty do 
               
             
          
           
               
                   
                  7: 
                 n = pop(Q) 
               
               
                   
                  8: 
                 node.attributeIndex = a n   
               
               
                   
                  9: 
                 node.threshold = t n   
               
               
                   
                 10: 
                 node.classVal = c n   
               
               
                   
                 11: 
                 node.child = childIndex 
               
               
                   
                 12: 
                 breadFirstTree[i] = node 
               
               
                   
                 13: 
                 i = i + 1 
               
               
                   
                 14: 
                 if d n   l  ≠ 0 then 
               
             
          
           
               
                   
                 15: 
                 push(Q), d n   l ) 
               
               
                   
                 16: 
                 childIndex = childIndex + 1 
               
             
          
           
               
                   
                 17: 
                 if d n   r  ≠ 0 then 
               
             
          
           
               
                   
                 18: 
                 push(Q, d n   r ) 
               
               
                   
                 19: 
                 childIndex = childIndex + 1 
               
               
                   
                   
               
             
          
         
       
     
         [0000]    
       
         
               
             
               
               
               
             
               
               
               
             
               
               
               
             
               
               
               
             
           
               
                   
               
               
                 Procedure 2 Serial Tree Evaluation 
               
               
                   
               
             
             
               
                   
               
             
          
           
               
                   
                  1: 
                 Parameter:            
               
               
                   
                  2: 
                 Parameter: breadthFirstTree[N] 
               
               
                   
                  3: 
                 Output: assignedClasses[|            |] 
               
               
                   
                  4: 
                 for all R ∈            do 
               
             
          
           
               
                   
                  5: 
                 i = 0 
               
               
                   
                  6: 
                 while breadthFirstTree[i].classVal = ⊥ do 
               
             
          
           
               
                   
                  7: 
                 a = breadthFirstTree[i].attributeIndex 
               
               
                   
                  8: 
                 t = breadthFirstTree[i].threshold 
               
               
                   
                  9: 
                 i = breadthFirstTree[i].childIndex + (r a  &gt; t) 
               
             
          
           
               
                   
                 10: 
                 c R  = breadthFirstTree[i].classVal 
               
               
                   
                 11: 
                 assignedClasses[R] = c R   
               
               
                   
                   
               
             
          
         
       
     
         [0041]    Data Decomposition 
         [0042]    Procedure 2 is parallelized by data decomposition almost trivially, since each record is independent of the others. We can simply assign m records to p processors and have each loop only over m. The only additional work is to map the m records to the global dataset for the purposes of indexing into the input and output arrays. Procedure 3 shows the algorithm for each processor with indexing details for parameters D and assignedClasses. We use D (s . . . t) to mean the subset of elements of D beginning at element s up to but not including element t. Here, we assume a shared memory architecture so that all processors have equal access to the parameter and output buffers. Knowing the index to a record R in D also gives the index to the corresponding assignedClasses value. The steps of making D, breadthFirstTree, and assignedClasses available to each processor are omitted. 
         [0000]    
       
         
               
             
               
               
             
               
               
             
               
               
             
               
               
             
           
               
                   
               
               
                 Procedure 3 Data-Parallel Tree Evaluation 
               
               
                   
               
             
             
               
                   
               
             
          
           
               
                  1: 
                 Parameter:            
               
               
                  2: 
                 Parameter: breadthFirstTree[N] 
               
               
                  3: 
                 Parameter: m ∈            , the number of records for this processor to 
               
               
                   
                 process 
               
               
                  4: 
                 Parameter: p ∈            , this processor’s rank 
               
               
                  5: 
                 Output: assignedClasses[|            |] 
               
               
                  6: 
                 for all R ∈            [m · p .. m(p + 1)) do 
               
             
          
           
               
                  7: 
                 i = 0 
               
               
                  8: 
                 while breadthFirstTree[i].class            al = ⊥ do 
               
             
          
           
               
                  9: 
                 a = breadthFirstTree[i].attributeIndex 
               
               
                 10: 
                 t = breadthFirstTree[i].threshold 
               
               
                 11: 
                 i = breadthFirstTree[i].childIndex + (r a  &gt; t) 
               
             
          
           
               
                 12: 
                 c R  = breadthFirstTree[i].classVal 
               
               
                 13: 
                 assignedClasses[R] = c R   
               
               
                   
               
             
          
         
       
     
         [0043]    Decomposition Method 
         [0044]    While a data decomposition applies multiple processors to the evaluation problem very efficiently, the task of evaluating a single tree is still done serially. Once m is reduced to 1, no further processors can be applied to the problem usefully. Also, very deep and unbalanced trees may lead to asymmetries in the runtime between processors. In image segmentation, for instance, neighboring samples are expected to take similar paths through the tree and have almost uniform class values. By luck of the draw, some processor may be assigned m records that happen to be classified by the deepest node in the tree while others have records classified at the top of the tree. This leads to idle time in the “lucky” processors, and thereby, practical inefficiency. Further, adjacent records taking different paths leads to similar inefficiencies in SIND architectures like CUDA SMs or Intel&#39;s SSE instruction set. 
         [0045]    The decomposition method of the present disclosure avoids the issues of divergent paths, irregular memory access patterns, idle time due to asymmetrical processing times, and to provide more uniform evaluation times needed in deterministic, real-time applications. We assign to each record a group of p processors, called a record group, such that p=N. If there are G such groups, the total number of processors becomes P=Gp. Within the group, each node n of the tree is assigned to processor p″. The first step of the algorithm is to evaluate all nodes in parallel. Each processor stores the child node index i determined by the node evaluation into a shared memory array, path, having one element for each processor. The second step is to reduce the path through the tree to the selected leaf node. This is done by having each processor copy the path value of its child node into its own element of path. That is, each node finds its successor&#39;s successor and adopts that as its own successor. We can then think of the path array as storing the eventual successor for each node, with the eventual successor of the root node being the terminal node for the record. This step must be done synchronously across all processors in the record group. Leaf nodes are specifically designed to always evaluate to themselves by setting their threshold to -oo and their child index to be their own index. 
         [0046]      FIG. 2  shows an example tree and the path array after the initial node evaluation ( 2   b ), then after one ( 2   c ) and two ( 2   d ) steps of the parallel reduction phase. Note that for a tree of depth d, only Θ(log  2 d) reduction steps are necessary for the root node to arrive at the terminal leafs index. When this occurs, the reduction terminates. 
         [0047]    Procedure 4 gives the parallel algorithm, which handles indexing the dataset as before but now accounts for the specific record group g in the calculation as well as determining which node of the tree each processor is assigned to and setting up the shared variable path. To compute the dataset indices, we can follow the form of Procedure 3 but substitute g for p. Again, we assume a shared arrangement for the input dataset and the output assignedClasses where the indices in each array correspond naturally. We use the primitive barrier( )to provide syncluonization on updates to path from within record group g. 
         [0000]    
       
         
               
             
               
               
             
               
               
             
               
               
             
               
               
             
           
               
                   
               
               
                 Procedure 4 Speculative Parallel Tree Evaluation 
               
               
                   
               
             
             
               
                   
               
             
          
           
               
                  1: 
                 Parameter:            
               
               
                  2: 
                 Parameter: breadthFirstTree[N] 
               
               
                  3: 
                 Parameter: m ∈            , the number of records for this record group to 
               
               
                   
                 process 
               
               
                  4: 
                 Parameter: g ∈            , the record group this processor belongs to 
               
               
                  5: 
                 Parameter: p n  ∈            , this processor’s rank in the record group 
               
               
                  6: 
                 Output: assignedClasses[|            |] 
               
               
                  7: 
                 Shared Variable: path└N┘ 
               
               
                  8: 
                 for all R ⊂            [m · g .. m(g | 1)) do 
               
             
          
           
               
                  9: 
                 a = breadthFirstTree[p n ].attributeIndex 
               
               
                 10: 
                 t = breadthFirstTree[p n ].threshold 
               
               
                 11: 
                 path[p n ] = breadthFirstTree[p n ].childIndex + (r a  &gt; t) 
               
               
                 12: 
                 barrier(g) 
               
               
                 13: 
                 rootClass = breadthFirstTree[path[0]].classVal 
               
               
                 14: 
                 while rootClass = ⊥ do 
               
             
          
           
               
                 15: 
                 path[p n ] = path[path[p n ]] 
               
               
                 16: 
                 barrier(g) 
               
               
                 17: 
                 rootClass = breadthFirstTree└path└0┘┘.classVal 
               
             
          
           
               
                 18: 
                 c R  = rootClass 
               
               
                 19: 
                 assignedClasses[R] = c R   
               
               
                   
               
             
          
         
       
     
         [0048]    Alternate Embodiment of Decomposition Method 
         [0049]    A few inefficiencies exist in Procedure 4. First, processors assigned to leaf nodes will always produce the same, known output, and so their assigned processors do no productive work. To avoid this waste, the path array can be initialized with the known, static results for all leaves. Processors will only be assigned to decision nodes such that 0≦p n &lt;(N−1)/2, the number of internal nodes in a full binary tree. This means, however, that mapping processors in a record group to tree nodes is no longer a simple, sequential operation. A tree-specific look-up table can accommodate this. As the record group processes, each processor will modify only the element of path it is assigned to. 
         [0050]    Second, if the tree reduction is viewed probabilistically, we see that most records will end up at some leaf between levels 1 and d of the tree, averaging to some d i , for the dataset. Checking the while condition on line 14 of Procedure 4 for all levels d r &lt;d μ  leads to an expected inefficiency. If d μ  is known or can be determined experimentally for the tree, reducing d μ  levels in a single while loop pass can provide an average case performance enhancement by reducing loop iterations and the number of barrier operations required. 
         [0051]    Procedure 5 gives the improved parallel algorithm for decomposition method of the present disclosure. We add the static paths for the leafs of the tree on line 3, and use that to initialize the path array in parallel on line 10. Each processor must now initialize two elements of path since there are only processors for the internal nodes. We also add the processor-node map on line 4, which records the node index i assigned to each processor. Line 20 shows the concept of multiple reductions per loop, though the optimal implementation will be tree-specific. 
         [0000]    
       
         
               
             
               
               
             
               
               
             
               
               
             
               
               
             
           
               
                   
               
               
                 Procedure 5 Speculative Parallel Tree Evaluation 
               
               
                   
               
             
             
               
                   
               
             
          
           
               
                  1: 
                 Parameter:            
               
               
                  2: 
                 Parameter: breadthFirstTree[N] 
               
               
                  3: 
                 Parameter: leafPaths[N] 
               
               
                  4: 
                 Parameter: processorNodeMap[(N − 1)/2] 
               
               
                  5: 
                 Parameter: m ∈            , the number of records for this record group to 
               
               
                   
                 process 
               
               
                  6: 
                 Parameter: g ∈            , the record group this processor belongs to 
               
               
                  7: 
                 Parameter: p n  ∈            , this processor’s rank in the record group 
               
               
                  8: 
                 Output: assignedClasses[|            |] 
               
               
                  9: 
                 Shared Variable: path[N] 
               
               
                 10: 
                 path[2p n ] = leafPaths[2p n ] 
               
               
                 11: 
                 path[2p n  + 1] = leafPaths[2p n  + 1] 
               
               
                 12: 
                 i = processorNodeMap[p n ] 
               
               
                 13: 
                 for all R ∈            [m · g .. m(g + 1)) do 
               
             
          
           
               
                 14: 
                 a = breadthFirstTree[i].attributeIndex 
               
               
                 15: 
                 t = breadthFirstTree[i].threshold 
               
               
                 16: 
                 path[i] = breadthFirstTree[i].childIndex + (r a  &gt; t) 
               
               
                 17: 
                 barrier(g) 
               
               
                 18: 
                 rootClass = breadthFirstTree[path[0]].classVal 
               
               
                 19: 
                 while rootClass = ⊥ do 
               
             
          
           
               
                 20: 
                 path[i] = path[path[path[i]]] 
               
               
                 21: 
                 barrier(g) 
               
               
                 22: 
                 rootClass = breadthFirstTree[path[0]].classVal 
               
             
          
           
               
                 23: 
                 c R  = rootClass 
               
               
                 24: 
                 assignedClasses[R] = c R   
               
               
                   
               
             
          
         
       
     
         [0052]    Management and Tuning of Parallel Algorithms 
         [0053]    Some management work is required for each algorithm in the sections above that is well within the ability of those skilled in the art and consequently is omitted for brevity and to preserve generality. This includes making the buffers for 3E), assignedClasses, breadthFirstTree and any of the other necessary symbols available to all the parallel processors for each algorithm. The mechanism for sharing these buffers depends on the programming environment used. Also, selection of optimal values for G and m given P, N, M, and the available execution hardware architecture is critical but entirely implementation dependent. 
         [0054]    Analysis of Evaluation Algorithms 
         [0055]    We now analyze the asymptotic behavior of these general algorithms assuming a traditional parallel processing setting of independent processors connected via shared memory. We perform an average case run time analysis by assigning d μ  to be the average depth of the tree traversed by the records in the dataset. This can be determined if the entire dataset is known a priori, or can be statistically estimated given a significant sample size, such as the training set. The serial runtime for Procedure 2 for M records is given by 
         [0000]        T   2   =Md   μ ( t   c   +t   c ) 
         [0000]    where t c  is the time to evaluate a node&#39;s attribute against its threshold and t c , is the time to compare the new node&#39;s class value to ⊥. We also refer to t n ,=t c +t c , as the time needed to evaluate a node. 
         [0056]    The run time for Procedure 3 is a function of P, the total number of processors applied, and is given by 
         [0000]    
       
         
           
             
               
                 T 
                 3 
               
                
               
                 ( 
                 P 
                 ) 
               
             
             = 
             
               
                 
                   M 
                   P 
                 
                  
                 
                   
                     d 
                     μ 
                   
                    
                   
                     ( 
                     
                       
                         t 
                         e 
                       
                       + 
                       
                         t 
                         c 
                       
                     
                     ) 
                   
                 
               
               + 
               
                 t 
                 i 
               
               + 
               
                 
                   t 
                   s 
                 
                  
                 
                   ( 
                   M 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where each processor classifies M/P records, t i  is the time needed to compute the index in D assigned to the each processor, and t s (M) is the time needed to transmit M records on the shared memory machine for processing. We can then examine the speedup of Procedure 3 as 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       S 
                       3 
                     
                      
                     
                       ( 
                       P 
                       ) 
                     
                   
                   = 
                   
                     
                       
                         T 
                         2 
                       
                       
                         
                           T 
                           3 
                         
                          
                         
                           ( 
                           P 
                           ) 
                         
                       
                     
                     = 
                       
                      
                     
                       
                         M 
                          
                         
                             
                         
                          
                         
                           
                             d 
                             μ 
                           
                            
                           
                             ( 
                             
                               
                                 t 
                                 e 
                               
                               + 
                               
                                 t 
                                 c 
                               
                             
                             ) 
                           
                         
                       
                       
                         
                           
                             M 
                             P 
                           
                            
                           
                             
                               d 
                               μ 
                             
                              
                             
                               ( 
                               
                                 
                                   t 
                                   e 
                                 
                                 + 
                                 
                                   t 
                                   c 
                                 
                               
                               ) 
                             
                           
                         
                         + 
                         
                           t 
                           i 
                         
                         + 
                         
                           
                             t 
                             s 
                           
                            
                           
                             ( 
                             M 
                             ) 
                           
                         
                       
                     
                   
                 
               
             
             
               
                 
                   = 
                     
                    
                   
                     P 
                     
                       1 
                       + 
                       
                         
                           P 
                            
                           
                             ( 
                             
                               
                                 t 
                                 i 
                               
                               + 
                               
                                 
                                   t 
                                   s 
                                 
                                  
                                 
                                   ( 
                                   M 
                                   ) 
                                 
                               
                             
                             ) 
                           
                         
                         
                           M 
                            
                           
                               
                           
                            
                           
                             
                               d 
                               μ 
                             
                              
                             
                               ( 
                               
                                 
                                   t 
                                   e 
                                 
                                 + 
                                 
                                   t 
                                   c 
                                 
                               
                               ) 
                             
                           
                         
                       
                     
                   
                 
               
             
           
         
       
     
         [0057]    If we assume t s (M)=σ, γ and we ignore σ, γ and t as small constants, then this simplifies asymptotically to 
         [0000]    
       
         
           
             
               
                 S 
                 3 
               
                
               
                 ( 
                 P 
                 ) 
               
             
             ≈ 
             
               P 
               
                 1 
                 + 
                 
                   
                     P 
                     σ 
                   
                   
                     
                       d 
                       μ 
                     
                      
                     
                       t 
                       n 
                     
                   
                 
               
             
           
         
       
     
         [0000]    which suggests the speedup will be decided by the relative performance of the memory copy and the serial node processing time. If they are very similar, we would not expect much speedup. If memory copies are very fast compared to node processing, some benefit may be had. Likewise for the efficiency, given by 
         [0000]    
       
         
           
             
               
                 E 
                 3 
               
                
               
                 ( 
                 P 
                 ) 
               
             
             = 
             
               
                 
                   
                     S 
                     3 
                   
                    
                   
                     ( 
                     P 
                     ) 
                   
                 
                 P 
               
               ≈ 
               
                 1 
                 
                   1 
                   + 
                   
                     
                       P 
                       σ 
                     
                     
                       
                         d 
                         μ 
                       
                        
                       
                         t 
                         n 
                       
                     
                   
                 
               
             
           
         
       
     
         [0000]    we expect good results only when copy time is much less than processing time. 
         [0058]    For Procedure 5, the analysis is a bit more involved. If each group of processors is assigned m=M/G records for G groups of p processors such that P=Gp, the parallel runtime is given by 
         [0000]    
       
         
           
             
               
                 T 
                 5 
               
                
               
                 ( 
                 P 
                 ) 
               
             
             = 
             
               
                 
                   
                     M 
                     p 
                   
                   P 
                 
                  
                 
                   ( 
                   
                     
                       t 
                       e 
                     
                     + 
                     
                       
                         ( 
                         
                           
                             log 
                             2 
                           
                            
                           
                             d 
                             μ 
                           
                         
                         ) 
                       
                        
                       
                         t 
                         c 
                       
                     
                   
                   ) 
                 
               
               + 
               
                 t 
                 i 
               
               + 
               
                 
                   t 
                   s 
                 
                  
                 
                   ( 
                   M 
                   ) 
                 
               
             
           
         
       
     
         [0000]    and the speedup is 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       S 
                       5 
                     
                      
                     
                       ( 
                       P 
                       ) 
                     
                   
                   - 
                   
                     
                       T 
                       2 
                     
                     
                       
                         T 
                         5 
                       
                        
                       
                         ( 
                         P 
                         ) 
                       
                     
                   
                   - 
                     
                    
                   
                     
                       M 
                        
                       
                           
                       
                        
                       
                         
                           d 
                           μ 
                         
                          
                         
                           ( 
                           
                             
                               t 
                               e 
                             
                             + 
                             
                               t 
                               c 
                             
                           
                           ) 
                         
                       
                     
                     
                       
                         
                           
                             M 
                             p 
                           
                           P 
                         
                          
                         
                           ( 
                           
                             
                               t 
                               e 
                             
                             + 
                             
                               
                                 ( 
                                 
                                   
                                     log 
                                     2 
                                   
                                    
                                   
                                     d 
                                     μ 
                                   
                                 
                                 ) 
                               
                                
                               
                                 t 
                                 c 
                               
                             
                           
                           ) 
                         
                       
                       + 
                       
                         t 
                         i 
                       
                       + 
                       
                         
                           t 
                           s 
                         
                          
                         
                           ( 
                           M 
                           ) 
                         
                       
                     
                   
                 
               
             
             
               
                 
                   = 
                     
                    
                   
                     P 
                     
                       
                         
                           p 
                            
                           
                             ( 
                             
                               
                                 t 
                                 e 
                               
                               + 
                               
                                 
                                   ( 
                                   
                                     
                                       log 
                                       2 
                                     
                                      
                                     
                                       d 
                                       μ 
                                     
                                   
                                   ) 
                                 
                                  
                                 
                                   t 
                                   c 
                                 
                               
                             
                             ) 
                           
                         
                         
                           
                             d 
                             μ 
                           
                            
                           
                             ( 
                             
                               
                                 t 
                                 e 
                               
                                
                               
                                 t 
                                 c 
                               
                             
                             ) 
                           
                         
                       
                       + 
                       
                         
                           P 
                            
                           
                             ( 
                             
                               
                                 t 
                                 i 
                               
                               + 
                               
                                 
                                   t 
                                   s 
                                 
                                  
                                 
                                   ( 
                                   M 
                                   ) 
                                 
                               
                             
                             ) 
                           
                         
                         
                           M 
                            
                           
                               
                           
                            
                           
                             
                               d 
                               μ 
                             
                              
                             
                               ( 
                               
                                 
                                   t 
                                   e 
                                 
                                  
                                 
                                   t 
                                   c 
                                 
                               
                               ) 
                             
                           
                         
                       
                     
                   
                 
               
             
           
         
       
     
         [0000]    with efficiency 
         [0000]    
       
         
           
             
               
                 E 
                 5 
               
                
               
                 ( 
                 P 
                 ) 
               
             
             = 
             
               
                 
                   
                     S 
                     5 
                   
                    
                   
                     ( 
                     P 
                     ) 
                   
                 
                 P 
               
               ≈ 
               
                 1 
                 
                   
                     
                       p 
                        
                       
                         ( 
                         
                           
                             t 
                             e 
                           
                           + 
                           
                             
                               ( 
                               
                                 
                                   log 
                                   2 
                                 
                                  
                                 
                                   d 
                                   μ 
                                 
                               
                               ) 
                             
                              
                             
                               t 
                               c 
                             
                           
                         
                         ) 
                       
                     
                     
                       
                         d 
                         μ 
                       
                        
                       
                         ( 
                         
                           
                             t 
                             e 
                           
                           + 
                           
                             t 
                             c 
                           
                         
                         ) 
                       
                     
                   
                   + 
                   
                     
                       P 
                       σ 
                     
                     
                       
                         d 
                         μ 
                       
                        
                       
                         t 
                         n 
                       
                     
                   
                 
               
             
           
         
       
     
         [0059]    Making the same assumptions about t s (M), t i , and γ, S 5 (P) simplifies 
         [0000]    
       
         
           
             
               
                 S 
                 5 
               
                
               
                 ( 
                 P 
                 ) 
               
             
             ≈ 
             
               P 
               
                 
                   
                     p 
                      
                     
                       ( 
                       
                         
                           t 
                           e 
                         
                         + 
                         
                           
                             ( 
                             
                               
                                 log 
                                 2 
                               
                                
                               
                                 d 
                                 μ 
                               
                             
                             ) 
                           
                            
                           
                             t 
                             c 
                           
                         
                       
                       ) 
                     
                   
                   
                     
                       d 
                       μ 
                     
                      
                     
                       ( 
                       
                         
                           t 
                           p 
                         
                         + 
                         
                           t 
                           r 
                         
                       
                       ) 
                     
                   
                 
                 + 
                 
                   
                     P 
                     σ 
                   
                   
                     
                       d 
                       μ 
                     
                      
                     
                       t 
                       n 
                     
                   
                 
               
             
           
         
       
     
         [0000]    asymptotically to 
         [0060]    For the values of P and d p , we examine, this should not be very different from S 3 (P). However, these equations allow us to examine when S 5 (P)&gt;S 3 (P), which occurs when 
         [0000]    
       
         
           
             
               
                 
                   p 
                    
                   
                     ( 
                     
                       
                         t 
                         e 
                       
                       + 
                       
                         
                           ( 
                           
                             
                               log 
                               2 
                             
                              
                             
                               d 
                               μ 
                             
                           
                           ) 
                         
                          
                         
                           t 
                           c 
                         
                       
                     
                     ) 
                   
                 
                 
                   
                     d 
                     μ 
                   
                    
                   
                     ( 
                     
                       
                         t 
                         e 
                       
                       + 
                       
                         t 
                         c 
                       
                     
                     ) 
                   
                 
               
               &lt; 
               1 
             
             , 
             or 
           
         
       
       
         
           
             
               p 
                
               
                 ( 
                 
                   
                     t 
                     e 
                   
                   + 
                   
                     
                       ( 
                       
                         
                           log 
                           2 
                         
                          
                         
                           d 
                           μ 
                         
                       
                       ) 
                     
                      
                     
                       t 
                       c 
                     
                   
                 
                 ) 
               
             
             &lt; 
             
               
                 d 
                 μ 
               
                
               
                 ( 
                 
                   
                     t 
                     e 
                   
                   + 
                   
                     t 
                     c 
                   
                 
                 ) 
               
             
           
         
       
       
         
           
             p 
             &lt; 
             
               
                 
                   d 
                   μ 
                 
                  
                 
                   ( 
                   
                     
                       t 
                       e 
                     
                     + 
                     
                       t 
                       c 
                     
                   
                   ) 
                 
               
               
                 
                   t 
                   e 
                 
                 + 
                 
                   
                     ( 
                     
                       
                         log 
                         2 
                       
                        
                       
                         d 
                         μ 
                       
                     
                     ) 
                   
                    
                   
                     t 
                     c 
                   
                 
               
             
           
         
       
     
         [0061]    If we further assume t e  and t c  are roughly equivalent operations (both being comparisons) and each taking time t, we can simplify this to 
         [0000]    
       
         
           
             p 
             &lt; 
             
               
                 2 
                  
                 
                   td 
                   μ 
                 
               
               
                 t 
                  
                 
                   ( 
                   
                     1 
                     + 
                     
                       
                         log 
                         2 
                       
                        
                       
                         d 
                         μ 
                       
                     
                   
                   ) 
                 
               
             
           
         
       
       
         
           
             p 
             &lt; 
             
               
                 2 
                  
                 
                   d 
                   μ 
                 
               
               
                 1 
                 + 
                 
                   
                     log 
                     2 
                   
                    
                   
                     d 
                     μ 
                   
                 
               
             
           
         
       
     
         [0062]    For practical values of d μ , the slope of the graph of 1 is around ⅓. Since the number of decision nodes grows faster than the average depth (at a rate dependent on the balancing of the tree), we should not expect a great speedup from Procedure 5 for any but the most shallow trees. 
         [0063]    Experiments on Parallel Classification Tree Algorithms 
         [0064]    The preceding analysis assumes each parallel node execution is independent from the others. In GPUs, particularly CUDA architecture, this is not the case. We expect to see a performance benefit due to local caching of neighboring records read from global memory in bursts, the SIMD coupling of execution nodes evaluated in parallel for each sample, having multiple SIMD groups resident and quickly switched to on the chosen hardware, and other such concerns. These are not general concerns but are specific to a particular hardware architecture. In this setting, it makes sense to pursue more specific analysis by experimentation. The following sections detail experiments done on the CUDA platform with runtime as the metric of performance. 
         [0065]    Problem Selection 
         [0066]    We selected the Image Segmentation dataset from UC Irvine&#39;s Machine Learning Repository as an evaluation problem representative of tasks in medical imaging or computer vision. This data set consists of 2310 records for training and an additional 2099 for testing. Each record consists of 19 real-valued attributes of a 3×3 pixel neighborhood and corresponds to one of 7 discrete classes. 
         [0067]    To generate a classifier based on this dataset, we used the Orange component-based machine learning library. This library provides Python bindings to a mature C++ machine learning library. We wrote a Python script to read the training set, train a classification tree, and generate C++ source code which encodes that tree according to Procedure 1. The resulting tree is shown schematically in  FIG. 3 . This tree has N=31 nodes, 16 leaves, and a depth of 11. 
         [0068]    Further, the script also combined the training set and the test set of records into a single table, then repeatedly randomized and output the records as C++ source code for easy inclusion in our test program. This process was repeated until 16,384 C++ records were generated. This set can be duplicated four times at runtime to create a dataset having 65,536 records, representing an image of 256×256 pixels. 
         [0069]    Experiment Setup—Machine Configuration 
         [0070]    Experiments were performed on a Dell Optiplex 780 with an Intel Core2 Duo E8600 CPU running at 3.33 GHz, 4 GB RAM, and the Windows 7 64-bit operating system. An NVIDIA Quadro 2000 GPU card was added with 1 GB of 128-bit RAM with a bandwidth of 41.6 GB/s and 192 CUDA cores in 4 SMs of 48 cores each with a 1.25 GHz processor clock. Software on the system included the NVIDIA driver version 263.06 and the CUDA 3.2.1 mntime Dll version 8.17.12.6303. All compilation was done with Microsoft Visual Studio 2008 and the CUDA 3.2 Development Toolkit, with project files generated by CMake version 2.8.3. 
         [0071]    Tests Conducted 
         [0072]    We created a program which, after building a dataset of 65,536 records, ran three tree evaluation functions 500 times each on the full dataset. For each function call, the Windows high performance counter was started before and stopped after the call and the delta time was accumulated. This is called the outer time for the algorithm. For those functions using a CUDA kernel, a similar inner time was collected around just the kernel invocation and excluded any time for memory copy to or from the GPU. During the kernel runtime, the host CPU was made to wait until the kernel completed. The three functions evaluated were as follows: 
       EvalTree: 
       [0073]    This function implements Procedure 2, a serial algorithm running on the host. Note that this function records no inner time and that the outer time does not include any memory copies since none are required for the host to evaluate the dataset. 
       EvalTreeBySample ( ): 
       [0074]    This is the data parallel algorithm given in Procedure 3. This function is written in CUDA C, and performs a host-to-device copy of the dataset and the tree definition before invoking the kernel. The grid is formed of 512 blocks having 128 threads each, all single-dimensioned. Onlyone record is evaluated per thread (i.e. m=1.) For this function (and all other CUDA functions), the tree is copied to device constant memory for cacheing purposes. When the kernel completes, the host copies the resulting class assignments back to host memory and frees all device resources. 
       EvalTreeByNode( ): 
       [0075]    This function fully implements the improved speculative algorithm corresponding to Procedure 5 with the following considerations: constant memory is used for the processor-node map and static leaf path buffers in addition to the tree definition; multiple reductions (specifically 2, determined empirically) are performed per iteration of the path reduction loop; and the explicit barrier( )operations are omitted since each thread executes synchronously within a warp. The shared memory path variable is initialized from the static leaf buffer only once at kernel invocation. This is safe since leaves never change and internal nodes are re-initialized by the node evaluation step done for each record. The grid is set to 128 blocks of 16×16 threads. Thus each block processes 16 record groups in parallel, each record group using p=16 threads (a half-warp) to evaluate a record. Note that there are only 15 internal nodes in the tree, so one thread is idle per record group (assigned to a phantom node). With 128×16 record groups, each must process m=32 records per group to cover 65,536 records exactly. Having thread geometry exactly match data size allows us to remove checks for over-sized grids—a non-portable practice but one with a noticeable performance effect. Data copies to and from the device were the same as in EvalTree By Sample ( ). 
         [0076]    After each CUDA function call, the returned buffer of class assignments was compared to the results obtained using the serial algorithm, and any discrepancies were reported. None were found. 
         [0077]    The entire program also ran with the CUDA profiler enabled. This facility captures device timestamps and other metrics resulting from the program execution. 
         [0078]    Results 
         [0079]    The program output giving the outer and inner times along with related statistics is summarized in Table 1. Most notable is that the serial evaluation on the host is twice as fast as the fastest parallel GPU version. This is surprising but perhaps a bit misleading, since no great pains were taken to optimize the memory copy tasks, all done in series. Pinning and aligning the host memory buffers and overlapping copies with computation are viable techniques to boost performance for this problem. 
         [0000]    
       
         
               
             
               
               
               
               
               
               
               
               
               
             
               
               
               
               
               
               
               
               
               
             
           
               
                 TABLE 1 
               
               
                   
               
               
                 Outer and Inner Times According to High-Performance Counter 
               
               
                   
               
             
             
               
                   
               
             
          
           
               
                 EvalTree 
                 3907.57 
                 3794.19 
                 4741.2 
                 71.2049 
                 538.235 
                 525.705 
                 769.309 
                 15.3554 
               
               
                 By Sample 
               
               
                 EvalTree 
                 3785.29 
                 3685.17 
                 4677.76 
                 87.0612 
                 404.466 
                 394.817 
                 432.698 
                 10.9616 
               
               
                 By Node 
               
               
                   
               
             
          
           
               
                   
                 Average Outer 
                 Min Outer 
                 Max Outer 
                 Std 
                 Average Inner 
                 Min Inner 
                 Max Inner 
                 Std 
               
               
                 Algorithm 
                 Time (μs) 
                 Time (μs) 
                 Time (μs) 
                 Dev 
                 Time (μs) 
                 Time (μs) 
                 Time (μs) 
                 Dev 
               
               
                   
               
               
                 EvalTree 
                 1914.16 
                 1900.48 
                 2343.65 
                 43.481 
                 N/A 
                 N/A 
                 N/A 
                 N/A 
               
               
                 (Host) 
               
               
                   
               
             
          
         
       
     
         [0080]    In our main result, comparing the inner times for kernel execution we see a roughly 25% performance increase in EvalTreeByNode over EvalTreeBySample. Further experiments on EvalTreeByNode showed that inclusion of a conditional for checking an over-sized warp increased runtime to roughly the same as EvalTreeBySample. With m=1, timings were again roughly equal, showing that the expense of the initial load of static paths and the processor-node map are amortized over multiple record iterations. Values for m&gt;32 (with related block resizing) showed no significant benefit. This and other experiments suggests that CUDA thread scheduling is as efficient as iterating in a for loop. 
         [0081]    Examination of the CUDA profiler output shows similar results for kernel timings 
         [0082]    ( FIG. 4 ), though uniformly lower than those measurable outside of the CUDA driver. The GPU times confirm a ˜25% improvement in kernel times of 353.47 μs vs 485.17 μs. The time in the graph for “memcpyHtoD” shows the copy time of the data set and tree definitions (two invocations per execution) for both CUDA functions over 500 iterations each. Adding this and the “memcpyDtoH” time to each of the kernel times gives the outer time for each function, less time taken by the host to allocate/free buffers and manage the function calls. 
         [0083]    The profiler data also shows EvalTreeByNode taking an average of 4373 divergent branches across all threads due to the half-warp scheduling, whereas EvalTreeBySample shows 3530 across all threads, as each thread in a warp will iterate through the tree a different number of times. EvalTreeByNode had a global cache read hit rate of 70%, while EvalTreeBySample had a hit rate of only 31%. 
         [0084]    With fewer threads per block, EvalTreeBySample encounters the limit on active blocks, leaving the achieved occupancy rate at 66%. EvalTreeByNode avoids this issue and achieves 100% occupancy. This increases the number of global memory requests for record data that can be active, and thus enhances the effect of latency hiding by the warp scheduler. This can be seen in the global memory write throughput of 0.643 GB/s versus 4.68 GB/s. Read throughputs are roughly equal at 14 GB/s (due to caching), giving overall global memory throughputs of 15.43 GB/s for EvalTreeBySample and 19.41 GB/s for EvalTreeByNode. 
         [0085]    The decomposition algorithm for parallel classification tree evaluation disclosed herein surpasses the performance of a data decomposition parallel algorithm on the CUDA platform. When ignoring the common, serial algorithm setup processing, the approach of the present disclosure is 25% faster than the data parallel approach in our particular problem instance. This demonstrates how different parallel decomposition techniques can maximize the advantages of a given platform. In a SIMD environment, we see that decomposition method of the present disclosure into many time-uniform tasks can have a helpful effect even at the cost of less efficient hardware utilization. We also see a good example of implementation results deviating from asymptotic theoretical analysis. This is most true when fundamental assumptions, such as independent execution units, do not hold in the implementation as is the case here. Ultimately, the best performance requires a careful balance of machine and algorithm for a specific problem. 
         [0086]    Additionally, we&#39;ve seen that measurement techniques that do not include the entire program overhead of distributing data or that compare different algorithms can lead to confusing results. Some of the differences suggest that a branchless evaluation algorithm ought to be used as the best known serial algorithm for speedup comparisons. 
         [0087]    In a further embodiment of the present disclosure, application of the embodiments described herein to very large trees can be achieved by evaluating only a small “window” on the tree, starting at a root node and evaluating only the next few levels. Once reduced, the resulting node would then become the root of the next window and the process repeated. This approach may be useful in overcoming SIMD concurrency limits (such as on a vectored processor) or the exponential growth of memory demand for deeper and deeper levels of the tree. 
         [0088]    Incorporated herein by reference in their entirety are the following:
       Paul Baumstarck. GPU parallel processing for fast robotic perception. Thesis, Engineer&#39;s degree, Stanford University, December 2009.   Yael Ben-Haim and Elad Tom-Tov. A streaming parallel decision tree algorithm. J. Mach. Learn. Res., 11:849-872, March 2010.   Ruoming Jin and Gagan Agrawal. Shared memory parallelization of decision tree construction using a general data mining middleware. In Proceedings of the 8 th  International Euro-Par Conference on Parallel Processing, Euro-Par &#39;02, pages 346-354, London, UK, 2002. Springer-Verlag.   Mahesh V. Joshi, George Karypis, and Vipin Kumar. Scalparc: A new scalable and efficient parallel classification algorithm for mining large datasets. In Proc. of the International Parallel Processing Symposium, pages 573-579,1998.   David B. Kirk and Wen-mei W. Hwu. Programming Massively Parallel Processors: A Hands-on Approach. Morgan Kaufmann, 1st edition, Feb 2010.   Manish Mehta, Rakesh Agrawal, and Jorma Rissanen. Sliq: A fast scalable classifier for data mining. In Proc. of the Fifth International Conference on Extending Database Technology (EDBT), pages 18-32, Avignon, France, March 1996.   A. Nair, B. Kuban, E. Tuzcu, P. Schoenhagen, S. Nissen, and D. Vince. Coronary plaque classification with intravascular ultrasound radiofrequency data analysis. Circulation, 106:2200-2206, October 2002.   Arnau Oliver and Jordi Freixenet. Automatic classification of breast density. In IEEE International Conference on Image Processing, pages 1258-1261,2005.   Jason Sanders and Edward Kandrot. CUDA by Example: An Introduction to General-Purpose GPU Programming. Addison-Wesley Professional, 1st edition, July 2010.   John Shafer, Rakeeh Agrawal, and Manish Mehta. Sprint: A scalable parallel classifier for data mining. In Proceedings of the 22nd International Conference on Very Large Databases (VLDB), pages 544-555. Morgan Kaufmann, September 1996.   Toby Sharp. Implementing decision trees and forests on a gpu. In European Conference on Computer Vision (ECCV) 2008, volume 5305 of Lecture Notes in Computer Science, pages 595-608. Springer, 2008.   D. Steinkraus, I. Buck, and P.Y. Simard. Using gpus for machine learning algorithms. In Document Analysis and Recognition, 2005. Proceedings. Eighth International Conference on, pages 1115-1120 Vol. 2, Aug.-1 Sep. 2005.   Mohammed J. Zaki, Ching-Tien Ho, and Rakesh Agrawal. Parallel classification for data mining on shared-memory multiprocessors. Data Engineering, International Conference on, 0:198, 1999.       
 
         [0102]    The present disclosure has been described in connection with certain embodiments, combinations, configurations and relative dimensions. It is to be understood, however, that the description given herein has been given for the purpose of explaining and illustrating the embodiments and are not intended to limit the scope of the invention. For example, even though the present disclosure has been described primarily as being used with virtual histology in an NUS imaging system, both in side and forward looking NUS imaging systems, the embodiments of the present disclosure are also suitable for use in an optical coherence tomography (OCT) imaging system. In addition, it is clear than an almost infinite number of minor variations to the form and function of the disclosed embodiments could be made and also still be within the scope of the present disclosure. Consequently, it is not intended that the invention be limited to the specific embodiments and variants of the invention disclosed. It is to be further understood that changes and modifications to the descriptions given herein will occur to those skilled in the art. Therefore, the scope of the invention should be limited only by the scope of the claims.