syclacademy icon indicating copy to clipboard operation
syclacademy copied to clipboard

Do not use pointers just because we can

Open keryell opened this issue 3 years ago • 4 comments

On slide 5 of Lecture_06_Data_Parallelism/index.html

void calc(int *in, int *out) {
void calc(int *in, int *out, int id) { 

should at least replaced by

void calc(const int in[], int out[]) {
void calc(const int in[], int out[], int id) { 

to express the intent.

keryell avatar Oct 18 '21 18:10 keryell

Slide 11 of Lecture_15_Image_Convolution/index.html

const char* inputImageFile = "../Code_Exercises/Images/dogs.png";
const char* outputImageFile = ../Code_Exercises/Images/blurred_dogs.png";

could be replaced by

auto inputImageFile = "../Code_Exercises/Images/dogs.png";
auto outputImageFile = ../Code_Exercises/Images/blurred_dogs.png";

to make Python programmers happy.

keryell avatar Oct 18 '21 18:10 keryell

Yeah these changes sound reasonable to me.

AerialMantis avatar Oct 27 '21 08:10 AerialMantis

@keryell are you able to make a PR for this change?

rodburns avatar Oct 27 '21 10:10 rodburns

Yes I can do it since my CppCon talk is over. :-)

keryell avatar Oct 29 '21 05:10 keryell