Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

This is a helper repo to accomodate
https://github.com/nubificus/vaccel-tutorials.

7 changes: 4 additions & 3 deletions app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
CC=gcc
LD=gcc
CFLAGS=-Wall
VACCEL_CFLAGS=-I../vaccelrt/src/include -I../vaccelrt/third-party/slog/src
VACCEL_LDFLAGS=-L../vaccelrt/build/src -lvaccel -ldl
VACCEL_INSTALL_PATH=(pkg-config --variable=prefix vaccel)
VACCEL_CFLAGS=-I${VACCEL_INSTALL_PATH}/include
VACCEL_LDFLAGS=-L${VACCEL_INSTALL_PATH}/lib/x86_64-linux-gnu -lvaccel -ldl
VADD_LDFLAGS=-L${PWD}/opencl_examples/build/vector_add -lvector_add
OCL_LDFLAGS=-L/usr/lib/x86_64-linux-gnu/ -lOpenCL
OCL_LDFLAGS=(pkg-config --libs OpenCL)


all: wrapper wrapper-args wrapper-vaccel wrapper-args-vaccel
Expand Down
6 changes: 3 additions & 3 deletions app/wrapper_exec-args.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ int vaccel_vector_add(int *A, int *B, int *C, int dimension)
struct vaccel_arg op_args[6];
struct vaccel_session sess;

ret = vaccel_sess_init(&sess, 0);
ret = vaccel_session_init(&sess, 0);
if (ret != VACCEL_OK) {
fprintf(stderr, "Could not initialize session\n");
return 1;
}

printf("Initialized session with id: %u\n", sess.session_id);
printf("Initialized session with id: %lu\n", sess.id);

char *library = "/tmp/libvector_add.so";
char *operation = "vector_add";
Expand All @@ -41,7 +41,7 @@ int vaccel_vector_add(int *A, int *B, int *C, int dimension)
}

close_session:
if (vaccel_sess_free(&sess) != VACCEL_OK) {
if (vaccel_session_release(&sess) != VACCEL_OK) {
fprintf(stderr, "Could not clear session\n");
return 1;
}
Expand Down
6 changes: 3 additions & 3 deletions app/wrapper_exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ int vaccel_vector_add()
int ret = 0;
struct vaccel_session sess;

ret = vaccel_sess_init(&sess, 0);
ret = vaccel_session_init(&sess, 0);
if (ret != VACCEL_OK) {
fprintf(stderr, "Could not initialize session\n");
return 1;
}

printf("Initialized session with id: %u\n", sess.session_id);
printf("Initialized session with id: %lu\n", sess.id);

char *library = "opencl_examples/build/vector_add/libvector_add.so";
char *operation = "vector_add";
Expand All @@ -28,7 +28,7 @@ int vaccel_vector_add()
}

close_session:
if (vaccel_sess_free(&sess) != VACCEL_OK) {
if (vaccel_session_release(&sess) != VACCEL_OK) {
fprintf(stderr, "Could not clear session\n");
return 1;
}
Expand Down
1 change: 0 additions & 1 deletion vaccelrt
Submodule vaccelrt deleted from 12f828