MCPcopy Create free account
hub / github.com/davisking/dlib / affine_transform_range

Function affine_transform_range

dlib/cuda/cpu_dlib.cpp:532–554  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

530 }
531
532 void affine_transform_range(
533 size_t begin,
534 size_t end,
535 tensor& dest,
536 const tensor& src1,
537 const tensor& src2,
538 const tensor& src3,
539 const float A,
540 const float B,
541 const float C
542 )
543 {
544 DLIB_CASSERT(dest.size()==src1.size());
545 DLIB_CASSERT(dest.size()==src2.size());
546 DLIB_CASSERT(dest.size()==src3.size());
547 DLIB_CASSERT(begin <= end && end <= dest.size());
548 const auto d = dest.host();
549 const auto s1 = src1.host();
550 const auto s2 = src2.host();
551 const auto s3 = src3.host();
552 for (size_t i = begin; i < end; ++i)
553 d[i] = A*s1[i] + B*s2[i] + C*s3[i];
554 }
555
556 // -----------------------------------------------------------------------------------
557

Callers 2

test_more_opsFunction · 0.50

Calls 2

sizeMethod · 0.45
hostMethod · 0.45

Tested by 1

test_more_opsFunction · 0.40