Previous | Next --- Slide 25 of 63
Back to Lecture Thumbnails
minglotus

The similarity between domain-specific languages and powerful, efficient fundamental library is that, they extract the hard-core && common logic and make them re-usable -> application engineers don't need to re-invent.

However, libraries might be completely written in higher level languages (C++, Java, etc) or might be advanced to exploit platform-dependent libraries (e.g., SIMD intrinsics by Intel programmer manual, like in PA1). Whereas domain-specific languages usually cannot work without a proper compiler (e.g., CUDA program needs a specific compiler, and cannot run on AMD GPU w/o another intermediate representation). The compiler bridges application program and hardware, and usually has target-dependent code generators for different hardwares supported.

shivalgo

So, can we think of 'Func' as a typedef of Halide::Buffer if they both point to the same object types? Looks like we don't need to do any memory management whatsoever, including any heap allocations. This means the transformations of Func collections are guaranteed to be cache optimal with the lowest possible miss rates? Also, just like RDDs, are Funcs like blurx, blury etc immutable as well?

parthiv

The API for Halide is super slick! Would OpenCV also be considered a DSL? The Halide::Buffer seems similar in concept to a cv::Mat though the approach of defining functions rather than manipulating data directly is quite interesting and different to OpenCV's approach.

yt1118

This reminds me the difference between declarative and imperative programming languages: the Halide implementation here describes what should be done, while the C++ implementation in the previous slide states how it should be done (by using threads, SIMD, etc). DSLs tend to be declarative languages which hide internal implementation details from programmers.

lindenli

I like the separation between abstraction and implementation that @yt1118 is getting at. It's a common theme throughout the course, and allows programmers (or domain experts) interested in image-processing applications to utilize libraries that manage the difficulties of parallel implementation.

martigp

What is meant by the "infinite but discrete set of values". Not entirely sure how something can be infinite in computer science!

Please log in to leave a comment.