]> foleosoft.com Git - QAnsel.git/commitdiff
Mon Mar 4 05:33:34 PM EST 2024
authormiha-q <>
Mon, 4 Mar 2024 22:33:34 +0000 (17:33 -0500)
committermiha-q <>
Mon, 4 Mar 2024 22:33:34 +0000 (17:33 -0500)
src/QAnsel.c

index db9885a4d045888d99d9a60863523e586da7b90c..067d7a2b81d848f3deb20d188cf684c3e81b61db 100644 (file)
@@ -11,7 +11,7 @@ unsigned char HIDDEN_VARIABLE = 0;
 FILE* RANDOM_FILE;
 #define GPU_ENABLED
 unsigned char USE_GPU = 1;
-unsigned char USE_THREADS = 0;
+unsigned char USE_THREADS = 1;
 
 typedef struct
 {
@@ -215,15 +215,15 @@ void qansel_instruction(cpx_mtx_t* stateVector, unsigned char qubitCount, QInstr
                printf("%ix%i (knk)\n", tmp.rows, tmp.cols);
                unsigned long int us1, us2;
                us1 = get_time();
-               cpx_mtx_knk_metal(tmp.ptr, stateVector->ptr, filter.ptr, stateVector->rows, stateVector->cols, filter.rows, filter.cols);
+               cpx_mtx_knk_metal(tmp.ptr, filter.ptr, gate.ptr, filter.rows, filter.cols, gate.rows, gate.cols);
                us2 = get_time();
                printf("\tMetal: %lu\n", us2 - us1);
                us1 = get_time();
-               cpx_mtx_knk_threads(tmp.ptr, stateVector->ptr, filter.ptr, stateVector->rows, stateVector->cols, filter.rows, filter.cols);
+               cpx_mtx_knk_threads(tmp.ptr, filter.ptr, gate.ptr, filter.rows, filter.cols, gate.rows, gate.cols);
                us2 = get_time();
                printf("\tThreads: %lu\n", us2 - us1);
                us1 = get_time();
-               cpx_mtx_knk(tmp.ptr, stateVector->ptr, filter.ptr, stateVector->rows, stateVector->cols, filter.rows, filter.cols);
+               cpx_mtx_knk(tmp.ptr, filter.ptr, gate.ptr, filter.rows, filter.cols, gate.rows, gate.cols);
                us2 = get_time();
                printf("\tBare: %lu\n", us2 - us1);