Skip to content

Commit e0444f6

Browse files
committed
fix some memory alignment issue
1 parent 63c5861 commit e0444f6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

gcopter/include/gcopter/firi.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ namespace firi
8787
const Eigen::VectorXd &x,
8888
Eigen::VectorXd &grad)
8989
{
90-
const int *pM = (int *)data;
90+
const int64_t *pM = (int64_t *)data;
9191
const double *pSmoothEps = (double *)(pM + 1);
9292
const double *pPenaltyWt = pSmoothEps + 1;
9393
const double *pA = pPenaltyWt + 1;
@@ -184,8 +184,8 @@ namespace firi
184184
const Eigen::Vector3d interior = xlp.head<3>();
185185

186186
// Prepare the data for MVIE optimization
187-
uint8_t *optData = new uint8_t[sizeof(int) + (2 + 3 * M) * sizeof(double)];
188-
int *pM = (int *)optData;
187+
uint8_t *optData = new uint8_t[sizeof(int64_t) + (2 + 3 * M) * sizeof(double)];
188+
int64_t *pM = (int64_t *)optData;
189189
double *pSmoothEps = (double *)(pM + 1);
190190
double *pPenaltyWt = pSmoothEps + 1;
191191
double *pA = pPenaltyWt + 1;

0 commit comments

Comments
 (0)