Commit a241fcba authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Benchmarks: fixed bug in copy-assignment test

parent 7b7a4f94
Loading
Loading
Loading
Loading
+13 −6
Original line number Diff line number Diff line
@@ -63,18 +63,25 @@ benchmarkVectorOperations( const int & loops,
    reset12();


    auto copyAssignHostHost = [&]() {
        hostVector = hostVector2;
    };
    auto copyAssignHostCuda = [&]() {
        deviceVector = hostVector;
    };
    auto copyAssignCudaHost = [&]() {
        hostVector = deviceVector;
    };
    benchmarkOperation( "copy assigment (cross-device)", datasetSize, loops, reset1,
                        "CPU->GPU", copyAssignHostCuda,
                        "GPU->CPU", copyAssignCudaHost );


    auto copyAssignHostHost = [&]() {
        hostVector = hostVector2;
    };
    auto copyAssignCudaCuda = [&]() {
        deviceVector = hostVector;
        deviceVector = deviceVector2;
    };
    benchmarkOperation( "copy assigment", datasetSize, loops, reset1,
    benchmarkOperation( "copy assigment", 2 * datasetSize, loops, reset1,
                        "CPU->CPU", copyAssignHostHost,
                        "CPU->GPU", copyAssignHostCuda,
                        "GPU->GPU", copyAssignCudaCuda );