Code Monkey home page Code Monkey logo

daxtoolkit's Introduction

Data Analysis at Extreme

The Dax Toolkit is an open source C++ header only library that provides a collection of data analysis and visualization algorithms that run well on multi- and many-core processors. The Dax Toolkit also makes it easy to design other visualization algorithms that work well on such processors. We currently support CUDA, OpenMP, Intel TBB, and Serial Execution.

How

The Dax Toolkit uses fine-grained concurrency for data analysis and visualization algorithms. The basic computational unit of the Dax Toolkit is a worklet, a function that implements the algorithm’s behavior on an element of a mesh (that is, a point, edge, face, or cell) or a small local neighborhood.

The worklet is constrained to be serial and stateless; it can access only the element passed to and from the invocation. With this constraint, the serial worklet function can be concurrently scheduled on an unlimited number of threads without the complications of threads or race conditions.

Although worklets are not allowed communication, many visualization algorithms require operations such as variable array packing and coincident topology resolution that intrinsically require significant coordination among threads. Dax enables such algorithms by classifying and implementing the most common and versatile communicative operations into worklet types which are managed by the Dax scheduler.

Why

The Dax Toolkit simplifies the development of parallel visualization algorithms. Consider the computation of gradients using finite differences. Because the Dax Toolkit is structured such that it can schedule its execution on a GPU, we measure that it performs this operation over 100 times faster than VTK running on a single CPU. Furthermore, the Dax API can be switched to a different device by changing only a single line of code. Dax currently provides scheduling for CUDA (GPU), OpenMP (multicore CPU), and serial execution.

struct CellGradient : public dax::exec::WorkletMapCell
{
  typedef void ControlSignature(Topology, Field(Point), Field(Point), Field(Out));
  typedef _4 ExecutionSignature(_1,_2,_3);

  template<class CellTag>
  DAX_EXEC_EXPORT
  dax::Vector3 operator()(
      CellTag cellTag,
      const dax::exec::CellField<dax::Vector3,CellTag> &coords,
      const dax::exec::CellField<dax::Scalar,CellTag> &pointField) const
  {
    dax::Vector3 parametricCellCenter =
        dax::exec::ParametricCoordinates<CellTag>::Center();

    return dax::exec::CellDerivative(parametricCellCenter,
                                     coords,
                                     pointField,
                                     cellTag);
  }
};

Getting Dax

The Dax repository is located at https://github.com/kitware/DaxToolkit

Dax dependencies are:

git clone git://github.com/Kitware/DaxToolkit.git dax
mkdir dax-build
cd dax-build
cmake-gui ../dax

A detailed walk-through of installing and building Dax can be found on our Install page

A walk-through of integrating Dax into your project can be found on our [Integration page] (http://www.daxtoolkit.org/index.php/How_To_Use_Dax_In_Your_Project)

Example

This basic worklet finds the magnitude of a vector

class Magnitude : public dax::exec::WorkletMapField
{
public:
  typedef void ControlSignature(Field(In), Field(Out));
  typedef void ExecutionSignature(_1,_2);

  DAX_EXEC_EXPORT void operator()(const dax::Vector3 &inValue,
                                  dax::Scalar &outValue) const
    { outValue = dax::math::Magnitude(inValue); }
};

And here is how to execute the worklet:

#include <dax/cont/ArrayHandle.h>
#include <dax/cont/Scheduler.h>
#include <dax/cont/UniformGrid.h>

//construct a handle to store the results
dax::cont::ArrayHandle<dax::Scalar> magnitudeHandle;

//input grid of cubes 1,1,1 at origin 0,0,0 with extents 0,0,0 => 128,128,128
dax::cont::UniformGrid<> inputGrid;
inputGrid.SetExtent(dax::make_Id3(0), dax::make_Id3(127));

//construct a scheduler and launch the magnitude worklet.
dax::cont::Scheduler<> scheduler;
scheduler.Invoke(dax::worklet::Magnitude(),
                 grid->GetPointCoordinates(),
                 magnitudeHandle);

More examples can be found on our Getting Started page

Publications

Flexible Analysis Software for Emerging Architectures. Kenneth Moreland, Brad King, Robert Maynard, and Kwan-Liu Ma. In ''Petascale Data Analytics: Challenges and Opportunities (PDAC-12), November 2012.

Dax Toolkit: A Proposed Framework for Data Analysis and Visualization at Extreme Scale. Kenneth Moreland, Utkarsh Ayachit, Berk Geveci, and Kwan-Liu Ma. In ''IEEE Symposium on Large-Scale Data Analysis and Visualization (LDAV), October 2011.

Dax: Data Analysis at Extreme. Kenneth Moreland, Utkarsh Ayachit, Berk Geveci, and Kwan-Liu Ma. In ''Proceedings of SciDAC 2011'', July 2011.

Contacts

Kenneth Moreland
Sandia National Laboratories
[email protected]

Robert Maynard
Kitware, Inc.
[email protected]

Berk Geveci
Kitware, Inc.
[email protected]

Kwan-Liu Ma
University of California at Davis
[email protected]

License

Copyright (c) Kitware, Inc.
All rights reserved.
See LICENSE.txt for details.

Copyright 2011 Sandia Corporation.
Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
the U.S. Government retains certain rights in this software.

This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the copyright file for more information.

daxtoolkit's People

Contributors

utkarshayachit avatar nixz avatar bradking avatar

Watchers

chenbk avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.