Demo entry 6850740

c++

   

Submitted by anonymous on Jul 11, 2019 at 04:06
Language: C++. Code size: 1.2 kB.

#include <thread>

#include <ode/common.h>
#include <ode/odemath.h>
#include <ode/rotation.h>
#include <ode/objects.h>
#include <ode/timer.h>
#include <ode/error.h>
#include <ode/matrix.h>
#include <ode/misc.h>
#include "config.h"
#include "objects.h"
#include "joints/joint.h"
#include "util.h"

#ifndef _WIN32
  #include <sys/time.h>
#endif

#include "quickstep_util.h"
#include "quickstep_pgs_lcp.h"
#ifndef TIMING
#ifdef HDF5_INSTRUMENT
#define DUMP
std::vector<dReal> errors;
#endif   //HDF5_INSTRUMENT
#endif   //timing

using namespace ode;

static void* ComputeRows(void *p)
{
  dxPGSLCPParameters *params = (dxPGSLCPParameters *)p;

  #ifdef REPORT_THREAD_TIMING
  int thread_id                 = params->thread_id;
  struct timeval tv;
  double cur_time;
  gettimeofday(&tv,NULL);
  cur_time = (double)tv.tv_sec + (double)tv.tv_usec / 1.e6;
  // printf("thread %d started at time %f\n",thread_id,cur_time);
  #endif

  IndexError* order             = params->order;
  dxBody* const* body           = params->body;
#ifdef RANDOMLY_REORDER_CONSTRAINTS
#ifdef LOCK_WHILE_RANDOMLY_REORDER_CONSTRAINTS
  boost::recursive_mutex* mutex = params->mutex

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).