示例#1
0
 bool operator< (array_ref<U> const& t) const
 {
     T const* pself = data;
     U const* pother = t.data;
     for (; pself != &data[N] && pother != t.data[t.size()]; ++pself, ++pother) {
         if (*pself < *pother) return true;
     }
     if (N < t.size()) return true;
     return false;
 }
示例#2
0
 bool operator==(array_ref<U> const& t) const {
     if (N != t.size()) return false;
     T const* pself = data;
     U const* pother = t.data;
     for (; pself != &data[N]; ++pself, ++pother) {
         if (*pself != *pother) return false;
     }
     return true;
 }
示例#3
0
 /// Appends an indirect branch instruction to the active label scope.
 instruction goto_(value const & target, array_ref<label> const & labels)
 {
   // Note: no update to the current label.
   llvm::IRBuilder<> & bldr = current_builder();
   llvm::IndirectBrInst * rv = SPRITE_APICALL(
       bldr.CreateIndirectBr(target.ptr(), labels.size())
     );
   for(label const & l : labels)
     rv->addDestination(l.ptr());
   return instruction(rv);
 }
示例#4
0
文件: main.cpp 项目: CCJY/coliru
void f(array_ref<int> xs) {
    std::cout << std::accumulate(xs.begin(), xs.end(), 0) << '\n';
}
示例#5
0
文件: fir.hpp 项目: dlevin256/kfr
 fir_state(const array_ref<const T>& taps)
     : taps(taps.size()), delayline(taps.size(), U(0)), delayline_cursor(0)
 {
     this->taps = reverse(make_univector(taps.data(), taps.size()));
 }