HDINLINE
 TCursor operator()(const TCursor& cursor, const math::Int<2>& jump) const
 {
     math::Int<2> twistedJump;
     twistedJump[Axes::x::value] = jump.x();
     twistedJump[Axes::y::value] = jump.y();
     return cursor(twistedJump);
 }
Exemple #2
0
 HDINLINE
 Data operator()(const Data& data, const math::Int<dim>& jump) const
 {
     char* result = (char*)data;
     result += jump.x() * sizeof(typename boost::remove_pointer<Data>::type)
            + jump.y() * Pitch::x::value;
     return (Data)result;
 }
Exemple #3
0
 HDINLINE
 math::Int<3> operator()(const math::Int<2>& _blockIdx,
                           const math::Int<3>& _threadIdx) const
 {
     return math::Int<3>(
         (_blockIdx.x() % this->widthInBlocks),
         _blockIdx.y(),
         (_blockIdx.x() / this->widthInBlocks)) * (math::Int<3>)BlockDim().vec() + _threadIdx;
 }
Exemple #4
0
 inline Plotter& operator=(const math::Float<3>& color)
 {
     png.plot(pos.x()+1, pos.y()+1, (double)color.x(), (double)color.y(), (double)color.z());
     return *this;
 }