diff --git a/README.md b/README.md index 90700dc..df136bc 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,4 @@ This is a helper repo to accomodate https://github.com/nubificus/vaccel-tutorials. + diff --git a/app/Makefile b/app/Makefile index 7c1d45f..de6fd8a 100644 --- a/app/Makefile +++ b/app/Makefile @@ -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 diff --git a/app/wrapper_exec-args.c b/app/wrapper_exec-args.c index b0f0114..9927cc6 100644 --- a/app/wrapper_exec-args.c +++ b/app/wrapper_exec-args.c @@ -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"; @@ -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; } diff --git a/app/wrapper_exec.c b/app/wrapper_exec.c index 04bc0b5..4008054 100644 --- a/app/wrapper_exec.c +++ b/app/wrapper_exec.c @@ -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"; @@ -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; } diff --git a/vaccelrt b/vaccelrt deleted file mode 160000 index 12f8280..0000000 --- a/vaccelrt +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 12f82805fd9476667cf39dde1d566835be678965