Vector Optimized Library of Kernels  3.0.0
Architecture-tuned implementations of math kernels
volk_kernel_defs Namespace Reference

Data Structures

class  impl_class
 Extract kernel info from section, represent as an implementation. More...
 
class  kernel_class
 Represent a processing kernel, parse from file. More...
 

Functions

def comment_remover (text)
 Strip comments from a c/cpp file. More...
 
def split_into_nested_ifdef_sections (code)
 Split code into nested sections according to ifdef preprocessor macros. More...
 
def print_sections (sections, indent=' ')
 Recursive print of sections to test code above. More...
 
def flatten_section_text (sections)
 Flatten a section to just body text. More...
 
def extract_lv_haves (code)
 

Variables

 srcdir = os.path.dirname(os.path.dirname(__file__))
 
 kernel_files = sorted(glob.glob(os.path.join(srcdir, "kernels", "volk", "*.h")))
 
 kernels = list(map(kernel_class, kernel_files))
 

Function Documentation

◆ comment_remover()

def volk_kernel_defs.comment_remover (   text)

Strip comments from a c/cpp file.

Input is code string, output is code string without comments. http://stackoverflow.com/questions/241327/python-snippet-to-remove-c-and-c-comments

◆ extract_lv_haves()

def volk_kernel_defs.extract_lv_haves (   code)

◆ flatten_section_text()

def volk_kernel_defs.flatten_section_text (   sections)

Flatten a section to just body text.

◆ print_sections()

def volk_kernel_defs.print_sections (   sections,
  indent = '  ' 
)

Recursive print of sections to test code above.

◆ split_into_nested_ifdef_sections()

def volk_kernel_defs.split_into_nested_ifdef_sections (   code)

Split code into nested sections according to ifdef preprocessor macros.

Variable Documentation

◆ kernel_files

volk_kernel_defs.kernel_files = sorted(glob.glob(os.path.join(srcdir, "kernels", "volk", "*.h")))

◆ kernels

volk_kernel_defs.kernels = list(map(kernel_class, kernel_files))

◆ srcdir

volk_kernel_defs.srcdir = os.path.dirname(os.path.dirname(__file__))