MCPcopy Create free account
hub / github.com/clMathLibraries/clBLAS / roundtrip_func

Method roundtrip_func

src/client/clfunc_xher2k.hpp:590–622  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

588
589template<>
590void
591xHer2k<cl_float2>::roundtrip_func()
592{
593 timer.Start(timer_id);
594 cl_int err;
595 buffer_.A_ = clCreateBuffer(ctx_, CL_MEM_READ_ONLY,
596 (buffer_.lda_ * buffer_.a_num_vectors_ +
597 buffer_.offa_) * sizeof(cl_float2),
598 NULL, &err);
599 buffer_.B_ = clCreateBuffer(ctx_, CL_MEM_READ_ONLY,
600 (buffer_.ldb_ * buffer_.b_num_vectors_ +
601 buffer_.offb_) * sizeof(cl_float2),
602 NULL, &err);
603 buffer_.C_ = clCreateBuffer(ctx_, CL_MEM_READ_WRITE,
604 (buffer_.ldc_ * buffer_.c_num_vectors_ +
605 buffer_.offc_) * sizeof(cl_float2),
606 NULL, &err);
607 this->initialize_gpu_buffer();
608 clblasCher2k(order_, buffer_.uplo_, buffer_.transA_,
609 buffer_.N_, buffer_.K_, buffer_.alpha_,
610 buffer_.A_, buffer_.offa_, buffer_.lda_,
611 buffer_.B_, buffer_.offb_, buffer_.ldb_,
612 buffer_.beta_.s[0], buffer_.C_, buffer_.offc_,
613 buffer_.ldc_, numQueues, queues_, 0, NULL, NULL);
614
615 err = clEnqueueWriteBuffer(queues_[0], buffer_.C_, CL_TRUE,
616 buffer_.offc_ * sizeof(cl_float2),
617 buffer_.ldc_ * buffer_.c_num_vectors_ *
618 sizeof(cl_float2),
619 buffer_.cpuC_, 0, NULL, &event_);
620 clWaitForEvents(1, &event_);
621 timer.Stop(timer_id);
622}
623
624template<>
625void

Callers

nothing calls this directly

Calls 5

initialize_gpu_bufferMethod · 0.95
clblasCher2kFunction · 0.85
clblasZher2kFunction · 0.85
StartMethod · 0.80
StopMethod · 0.80

Tested by

no test coverage detected