ct2rs 0.9.19

Rust bindings for OpenNMT/CTranslate2
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "ctranslate2/ops/cos.h"

#include "dispatch.h"

namespace ctranslate2 {
  namespace ops {

    void Cos::operator()(const StorageView& x, StorageView& y) const {
      PROFILE("Cos");

      y.resize_as(x);

      DEVICE_AND_FLOAT_DISPATCH("Cos", x.device(), x.dtype(),
                                (primitives<D>::cos(x.data<T>(), y.data<T>(), x.size())));
    }

  }
}