I’m dealing with point clouds in LAS format as defined here ( http://www.asprs.org/wp-content/uploads/2010/12/LAS_1_4_r13.pdf ) [Table 12]
This translates into a struct like so:
long mX; long mY; long mZ; unsigned short mIntensity; unsigned int mReturnNumber : 3; // these 4 fields form 1 byte unsigned int mNumberOfReturns : 3; // unsigned int mScanDirection : 1; // unsigned int mEdgeOfLine : 1; // unsigned char mClassification; char mScanAngleRank; unsigned char mChannel; unsigned short mSourceId; double mGpsTime; unsigned short mRed; unsigned short mGreen; unsigned short mBlue;</code>
I need to process billions of these structs through CUDA, but CUDA doesn’t support the #pragma pack necessary to keep that structure at the correct size of 34 bytes.
Is there any way of keeping this data in its native format for processing in CUDA, or will there have to be a non-CUDA conversion step to add and remove the padding it seems to require? If so, this will greatly slow the whole process down, and we’re going for speed here, obviously.