小编Pet*_*rin的帖子

Fast array access using Racket FFI

I am trying to write OpenCV FFI in Racket and arrived at a point where arrays need to be manipulated efficiently. However, all my attempts to access arrays by using Racket FFI resulted in very inefficient code. Is there a way for fast access of C arrays using FFI?

In Racket, this type of manipulation is reasonably fast, i.e.:

(define a-vector (make-vector (* 640 480 3)))
(time (let loop ([i (- (* 640 480 3) 1)])
    (when (>= i 0) …
Run Code Online (Sandbox Code Playgroud)

opencv ffi racket

6
推荐指数
1
解决办法
690
查看次数

标签 统计

ffi ×1

opencv ×1

racket ×1