Coder Social home page Coder Social logo

bmpproject's Introduction

bmpProject : Multi-thread 기반 이미지 파일 (BMP) 처리 프로그램 작성

  • BMP 파일 로드 (mmap() 활용)
  • CPU 코어 개수 만큼의 N개의 Thread 생성
  • 각 Thread를 CPU affinity를 이용하여 각 CPU 코어에 할당
  • BMP 파일을 N개의 구역으로 나누고 N개의 Thread가 동시에 이미지 처리를 수행(e.g., 이미지 밝기 조절)
  • 최종 결과는 새로운 파일에 저장
  • 실행 Thread 개수에 따른 수행 시간 비교

Compilation

make

Execution

./auto.out

or

./bmpMain.out <bitmap file path> <new file path> <Num of Thread>

and then execute a python file to create a chart image to compare the time taken by the number of threads used. you need to activate a virtual environment before executing chart.py.

. venv/bin/activate
pip3 install matplotlib
python3 chart.py

example

./bmpMain.out sample.bmp sample_new.bmp 4

Result

Before

before

After

Vertical

after

Horizontal

after

Window-like

after

Execution time

timeChart

bmpproject's People

Contributors

cinxdy avatar kmchacha avatar

Watchers

 avatar  avatar

Forkers

kmchacha

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.