Example #1
0
 HDINLINE
 TCursor operator()(const TCursor& cursor, const math::Int<3>& jump) const
 {
     math::Int<3> twistedJump;
     twistedJump[Axes::x::value] = jump.x();
     twistedJump[Axes::y::value] = jump.y();
     twistedJump[Axes::z::value] = jump.z();
     return cursor(twistedJump);
 }
Example #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
            + jump.z() * Pitch::y::value;
     return (Data)result;
 }
Example #3
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);
     for(int i = 1; i < dim; i++)
         result += jump[i] * this->pitch[i-1];
     return (Data)result;
 }
Example #4
0
 HDINLINE
 math::Int<1> operator()(const math::Int<1>& _blockIdx,
                           const math::Int<1>& _threadIdx) const
 {
     return _blockIdx.x() * BlockDim::x::value + _threadIdx.x();
 }
Example #5
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;
 }