MCPcopy Create free account
hub / github.com/Cambricon/mlu-ops / initBasicParam

Function initBasicParam

kernels/fft/common/fft_basic_ops.cpp:700–718  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

698
699//
700static void initBasicParam(const int n, int &L, int &m) {
701 // split n into 2^m * L
702 m = 0;
703 L = n;
704 while (1) {
705 int rem = L % 2;
706 if (rem != 0) {
707 break;
708 }
709 m++;
710 L = L / 2;
711 }
712
713 // when L is smaller than 64, encrease L to ensure IO efficiency.
714 while (L < 64 && m > 1) {
715 L = L * 2;
716 m--;
717 }
718}
719
720static bool findStockham(mluOpHandle_t handle, int &L, int &m, int &L_sub,
721 bool &find_stockham) {

Callers 1

findFFTOptLimitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected