source: icGREP/icgrep-devel/icgrep/kernels/swizzled_multiple_pdep_kernel.h @ 6135

Last change on this file since 6135 was 6026, checked in by xwa163, 12 months ago
  1. Implement SwizzledMultiplePDEPkernel with the same logic as new PDEPkernel, remove LZ4MultiplePDEPkernel, improve the performance
  2. Remove some unnecessary include
  3. Add prefix for some kernels
  4. Remove a legacy kernel
File size: 1.3 KB
RevLine 
[6026]1/*
2 *  Copyright (c) 2017 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 */
5
6#ifndef ICGREP_SWIZZLED_MULTIPLE_PDEP_KERNEL_H
7#define ICGREP_SWIZZLED_MULTIPLE_PDEP_KERNEL_H
8
9#include "kernel.h"
10#include <llvm/IR/Value.h>
11#include <string>
12
13/**
14 * For every input stream set, SwizzledMultiplePDEPkernel do exactly the same thing as PDEPkernel kernel.
15 * However, instead of only handing one swizzled source stream, the SwizzledMultiplePDEPkernel handle
16 * the PDEP logic of multiple source streams at the same time to improve the performance in single thread
17 * environment.
18 */
19
20namespace kernel {
21
22class SwizzledMultiplePDEPkernel final : public MultiBlockKernel {
23public:
24    SwizzledMultiplePDEPkernel(const std::unique_ptr<kernel::KernelBuilder> & b, const unsigned swizzleFactor = 4, const unsigned numberOfStreamSet = 1, std::string name = "SwizzledMultiplePDEP");
25    bool isCachable() const override { return true; }
26    bool hasSignature() const override { return false; }
27private:
28    void generateMultiBlockLogic(const std::unique_ptr<KernelBuilder> & b, llvm::Value * const numOfStrides) final;
29private:
30    const unsigned mSwizzleFactor;
31    const unsigned mNumberOfStreamSet;
32};
33
34}
35
36#endif //ICGREP_SWIZZLED_MULTIPLE_PDEP_KERNEL_H
Note: See TracBrowser for help on using the repository browser.