Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Convert an int to a byte array

constantine-vassilev
6,401 Views

Does Intel has a fast routine for converting a 4 byteint and 4 byte float to a 4 byte byte array
and back?

Thanks in advance,
Constantine

0 Kudos
21 Replies
Vladimir_Dudnik
Employee
288 Views

I though I described that earlier. You may do

int abcd;

unsigned char* p = &abcd;

Now you can access a as p[3],b as p[2] and so on.

Vladimir

0 Kudos
Reply