mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-11-25 17:53:47 +00:00
tbsp: bugfix when outputStride > 1
This commit is contained in:
parent
36aaa77436
commit
e34b854338
1 changed files with 16 additions and 5 deletions
|
@ -281,10 +281,16 @@ static void evalRange(P * TBSP_RESTRICT dst, size_t numdst, P * TBSP_RESTRICT wo
|
|||
}
|
||||
|
||||
// right out-of-bounds
|
||||
for( ; i < numdst; ++i)
|
||||
if(i < numdst)
|
||||
{
|
||||
*dst = controlpoints[numcp - 1];
|
||||
dst += outputStride;
|
||||
const P p = controlpoints[(numcp - 1) * inputStride];
|
||||
do
|
||||
{
|
||||
*dst = p;
|
||||
dst += outputStride;
|
||||
++i;
|
||||
}
|
||||
while(i < numdst);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -520,8 +526,9 @@ struct Cholesky
|
|||
}
|
||||
|
||||
// Solves x for A * x + b. Both b and x must have length n.
|
||||
// Can solve in-place, ie. you may pass xv == bv.
|
||||
template<typename P>
|
||||
void solve(P * TBSP_RESTRICT const xv, const P * TBSP_RESTRICT const bv) const
|
||||
void solve(P * const xv, const P * const bv) const
|
||||
{
|
||||
const size_t n = L.size.w;
|
||||
|
||||
|
@ -602,8 +609,9 @@ struct LUDecomp
|
|||
}
|
||||
|
||||
// Solves x for A * x + b. Both b and x must have length n.
|
||||
// Can solve in-place, ie. you may pass xv == bv.
|
||||
template<typename P>
|
||||
void solve(P * TBSP_RESTRICT const xv, const P * TBSP_RESTRICT const bv) const
|
||||
void solve(P * const xv, const P * const bv) const
|
||||
{
|
||||
const size_t n = LU.size.w;
|
||||
|
||||
|
@ -797,6 +805,9 @@ struct Interpolator
|
|||
template<typename P>
|
||||
size_t generateControlPoints(P * cp, P * TBSP_RESTRICT workmem, const P *points) const;
|
||||
|
||||
inline size_t getNumGeneratedControlPoints() { return numcp; }
|
||||
inline size_t getNumInputPoints() { return nump; }
|
||||
|
||||
// ------------------------
|
||||
protected:
|
||||
size_t numcp, nump;
|
||||
|
|
Loading…
Reference in a new issue