Giter Site home page Giter Site logo

myrecipes's Introduction

Algorithms for numerical computation.

Just an exercise implementing the algorithms from 《数值计算方法》,林成森,科学出版社, do not guarantee the programs run perfectly.

Requirements:

  • make
  • gcc(>= c99)
  • sed(for makefile dependencies)
  • python

Project structure

Myrecipes
|-- include: header files
|-- test: test files
|   |-- Test.c
|   |-- Test.h
|   |-- GenerateTest.py
|   +-- test*.c
|-- [A-Z]*: source files
|-- (created) debug: intermediate files
+-- (created) lib: static library files

How test files are compiled

  • Test files follows the pattern in order to automatically parse and generate a test header file:

    • All the test functions are written in test*.c files.
    • Every test function must return int type, have no argumemts and be named as test*.
  • GenerateTest.py is a python script that scans through test*.c files, looks for functions that meet the conditions mentioned above and generate a header file Test.h which contains declarations, (macro)list of function variables, (macro)list of function names and (macro)the number of all the test functions.

  • Test.c is a short C file that includes Test.h, uses the macros in it to call every test function and print the summary infomation of the test.

To show the flow in a chart:

         GenerateTest.py
test*.c -----------------> Test.h \
                                  |---> test binary
                           Test.c /

myrecipes's People

Contributors

xlucn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.