Closed knotman90 closed 8 years ago
This produces a wrong initialization on the substate unless its type size is 1 byte. File: https://github.com/OpenCALTeam/opencal/blob/master/OpenCAL-OMP/source/cal2DBuffer.c at line 230.
void calSetBuffer2Di(CALint* M, int rows, int columns, CALint value) { memset(M, value, sizeof(CALint)_rows_columns); }
Same Problem in 3D version https://github.com/OpenCALTeam/opencal/blob/master/OpenCAL-OMP/source/cal3DBuffer.c
Fix using:
const int size = rows * columns * slices; int i; for (i=0; i<size; i++) M[i] = value;
This produces a wrong initialization on the substate unless its type size is 1 byte. File: https://github.com/OpenCALTeam/opencal/blob/master/OpenCAL-OMP/source/cal2DBuffer.c at line 230.
void calSetBuffer2Di(CALint* M, int rows, int columns, CALint value) { memset(M, value, sizeof(CALint)_rows_columns); }