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

index 77574da7c688fe70ae4463c12e6bf7311d6dfd63..5769cc3583c429d9bb4839cf478d335da77ac5fa 100644 (file)
@@ -214,7 +214,7 @@ void qansel_instruction(cpx_mtx_t* stateVector, unsigned char qubitCount, QInstr
                tmp.ptr = malloc(tmp.rows * (tmp.cols * 2) * sizeof(float));
 
                #ifdef GPU_ENABLED
-               if (USE_GPU && (tmp.rows >= 1024 || tmp.cols >= 1024))
+               if (USE_GPU && (tmp.rows >= 1024 && tmp.cols >= 1024))
                {
                        cpx_mtx_knk_metal(tmp.ptr, filter.ptr, gate.ptr, filter.rows, filter.cols, gate.rows, gate.cols);
                }
@@ -244,11 +244,6 @@ void qansel_instruction(cpx_mtx_t* stateVector, unsigned char qubitCount, QInstr
                cpx_mtx_dot(tmp.ptr, stateVector->ptr, filter.ptr, stateVector->rows, stateVector->cols, filter.rows, filter.cols);
        }
        #else
-       //cpx_ncpx_mmul_mt
-       //(
-       //      tmp.ptr, stateVector->ptr, filter.ptr,
-       //      stateVector->rows * 2, filter.cols * 2, stateVector->cols * 2
-       //);
        cpx_mtx_dot
        (
                tmp.ptr, stateVector->ptr, filter.ptr,