Skip to content

Commit

Permalink
fix some memory alignment issue
Browse files Browse the repository at this point in the history
  • Loading branch information
wangxuexiFINR committed Jun 6, 2023
1 parent 63c5861 commit e0444f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gcopter/include/gcopter/firi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ namespace firi
const Eigen::VectorXd &x,
Eigen::VectorXd &grad)
{
const int *pM = (int *)data;
const int64_t *pM = (int64_t *)data;
const double *pSmoothEps = (double *)(pM + 1);
const double *pPenaltyWt = pSmoothEps + 1;
const double *pA = pPenaltyWt + 1;
Expand Down Expand Up @@ -184,8 +184,8 @@ namespace firi
const Eigen::Vector3d interior = xlp.head<3>();

// Prepare the data for MVIE optimization
uint8_t *optData = new uint8_t[sizeof(int) + (2 + 3 * M) * sizeof(double)];
int *pM = (int *)optData;
uint8_t *optData = new uint8_t[sizeof(int64_t) + (2 + 3 * M) * sizeof(double)];
int64_t *pM = (int64_t *)optData;
double *pSmoothEps = (double *)(pM + 1);
double *pPenaltyWt = pSmoothEps + 1;
double *pA = pPenaltyWt + 1;
Expand Down

0 comments on commit e0444f6

Please sign in to comment.