Commit 9065f08c authored by Davis King's avatar Davis King

removed cruft

parent a4c5983a
...@@ -12,20 +12,6 @@ namespace dlib ...@@ -12,20 +12,6 @@ namespace dlib
namespace cpu namespace cpu
{ {
// -----------------------------------------------------------------------------------
void multiply (
tensor& dest,
const tensor& src
)
{
DLIB_CASSERT(dest.size()==src.size(),"");
const auto d = dest.host();
const auto s = src.host();
for (size_t i = 0; i < src.size(); ++i)
d[i] *= s[i];
}
// ----------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------
void multiply ( void multiply (
......
...@@ -15,11 +15,6 @@ namespace dlib ...@@ -15,11 +15,6 @@ namespace dlib
// ----------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------
void multiply (
tensor& dest,
const tensor& src
);
void multiply ( void multiply (
tensor& dest, tensor& dest,
const tensor& src1, const tensor& src1,
......
...@@ -27,25 +27,6 @@ namespace dlib ...@@ -27,25 +27,6 @@ namespace dlib
return dev; return dev;
} }
// -----------------------------------------------------------------------------------
__global__ void _cuda_multiply(float* d, const float* s, size_t n)
{
for (auto i : grid_stride_range(0, n))
{
d[i] *= s[i];
}
}
void multiply (
tensor& dest,
const tensor& src
)
{
DLIB_CASSERT(dest.size()==src.size(),"");
_cuda_multiply<<<512,512>>>(dest.device(), src.device(), src.size());
}
// ----------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------
__global__ void _cuda_multiply1(float* d, const float* s1, const float* s2, size_t n) __global__ void _cuda_multiply1(float* d, const float* s1, const float* s2, size_t n)
......
...@@ -24,11 +24,6 @@ namespace dlib ...@@ -24,11 +24,6 @@ namespace dlib
// ----------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------
void multiply (
tensor& dest,
const tensor& src
);
void multiply ( void multiply (
tensor& dest, tensor& dest,
const tensor& src1, const tensor& src1,
......
...@@ -92,22 +92,6 @@ namespace dlib { namespace tt ...@@ -92,22 +92,6 @@ namespace dlib { namespace tt
} }
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
void multiply (
tensor& dest,
const tensor& src
)
{
DLIB_CASSERT(have_same_dimensions(dest,src) == true,"");
#ifdef DLIB_USE_CUDA
cuda::multiply(dest, src);
#else
cpu::multiply(dest, src);
#endif
}
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
void multiply ( void multiply (
......
...@@ -90,22 +90,6 @@ namespace dlib { namespace tt ...@@ -90,22 +90,6 @@ namespace dlib { namespace tt
#endif #endif
}; };
// ----------------------------------------------------------------------------------------
// TODO, delete this function
void multiply (
tensor& dest,
const tensor& src
);
/*!
requires
- have_same_dimensions(dest,src) == true
ensures
- #dest == dest*src
That is, for all valid i:
#dest.host()[i] == dest.host()[i]*src.host()[i]
!*/
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
void multiply ( void multiply (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment