Xilinx / Vitis-HLS-Introductory-Examples

Other
599 stars 158 forks source link

Mixed indentation may cause user guide(s) to be less readable #17

Closed rkost closed 1 year ago

rkost commented 1 year ago

Hey, thanks for creating this repo!

I noticed that some examples use a mix of tabs and spaces for indentation. While this is okay-ish for most text editors, it causes some trouble with your user guides (e.g. the PDF of UG1399 2023.1, page 138 - the fprintf calls are not aligned). I guess your text processor is confused due to the mix of tabs and spaces on the same line. Source: https://github.com/Xilinx/Vitis-HLS-Introductory-Examples/blob/d234d0ead478643e12cdf8fc875fa56612758d6a/Modeling/Pointers/stream_good/pointer_stream_good_test.c#L126-L131 (Github also renders it differently here vs when you open the full file.)

I could just provide a pull request for the entire repository to use either tab or space indentation if you like. Feel free to close if you don't want this fixed.

ramanan-radhakrishnan commented 1 year ago

Hi,

Thanks for your comment. I looked at the file in question and it seems to be formatted correctly. It is GitHub that is somehow screwing up the indenting.

// Save the results to a file fp = fopen("result.dat", "w"); fprintf(fp, "Din Dout\n"); for (i = 0; i < 4; i++) { if (i < 2) fprintf(fp, "%d %d\n", d_i[i], d_o[i]); else fprintf(fp, "%d \n", d_i[i]); } fclose(fp);