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

Method roundtrip_func

src/client/clfunc_xherk.hpp:457–486  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

455
456template<>
457void
458xHerk<cl_float2>::roundtrip_func()
459{
460 timer.Start(timer_id);
461 cl_int err;
462 buffer_.A_ = clCreateBuffer(ctx_, CL_MEM_READ_ONLY,
463 (buffer_.lda_ * buffer_.a_num_vectors_ +
464 buffer_.offa_) * sizeof(cl_float2),
465 NULL, &err);
466
467 buffer_.C_ = clCreateBuffer(ctx_, CL_MEM_READ_WRITE,
468 (buffer_.ldc_ * buffer_.c_num_vectors_ +
469 buffer_.offc_) * sizeof(cl_float2),
470 NULL, &err);
471 this->initialize_gpu_buffer();
472
473 clblasCherk(order_, buffer_.uplo_, buffer_.transA_,
474 buffer_.N_, buffer_.K_, buffer_.alpha_.s[0],
475 buffer_.A_, buffer_.offa_, buffer_.lda_,
476 buffer_.beta_.s[0], buffer_.C_, buffer_.offc_,
477 buffer_.ldc_, numQueues, queues_, 0, NULL, NULL);
478
479 err = clEnqueueWriteBuffer(queues_[0], buffer_.C_, CL_TRUE,
480 buffer_.offc_ * sizeof(cl_float2),
481 buffer_.ldc_ * buffer_.c_num_vectors_ *
482 sizeof(cl_float2),
483 buffer_.cpuC_, 0, NULL, &event_);
484 clWaitForEvents(1, &event_);
485 timer.Stop(timer_id);
486}
487
488template<>
489void

Callers

nothing calls this directly

Calls 5

initialize_gpu_bufferMethod · 0.95
clblasCherkFunction · 0.85
clblasZherkFunction · 0.85
StartMethod · 0.80
StopMethod · 0.80

Tested by

no test coverage detected