vmax_pos   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/contrib/TSM_library.xtm

Implementation

;This returns the position of the max value in a vector
(bind-func vmax_pos:[i64,float*,i64]*
  (lambda (buf:float* len:i64)
    (let ((max_val:float (pref buf 0))
          (i:i64 0)
          (max_pos:i64 0))
      (dotimes (i len)
        (if (> (pref buf i) max_val)
          (begin
            (set! max_val (pref buf i))
            (set! max_pos i))))
      max_pos)))


Back to Index

Similar Entries

  • BTree_walk_postorder    xtlang    /digego/extempore/tree/v0.8.9/libs/core/adt.xtm
  • PARAM_PAN_POS    scheme    /digego/extempore/tree/v0.8.9/libs/core/instruments-scm.xtm
  • PARAM_PAN_POS    scheme    /digego/extempore/tree/v0.8.9/libs/core/instruments-scm.xtm
  • PARAM_PAN_POS    scheme    /digego/extempore/tree/v0.8.9/examples/sharedsystem/audiosetup.xtm
  • Widget_find_postorder    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gui.xtm
  • Widget_walk_postorder    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gui.xtm
  • cl:position    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • cpTransformNewTranspose    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/libchipmunk/cpTransform.xtm
  • create_post_process_shader    xtlang    /digego/extempore/tree/v0.8.9/examples/external/shader-tutorials/framebuffer.xtm
  • decompose_domain    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/mpi/random-walk.xtm
  • fill_pos_scale_matrix    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • get_cursor_pos    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/win32.xtm
  • get_new_pos    xtlang    /digego/extempore/tree/v0.8.9/examples/core/godot_test1.xtm
  • get_new_pos2    xtlang    /digego/extempore/tree/v0.8.9/examples/core/godot_test1.xtm
  • get_position    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/kinect2.xtm
  • ghttp_perform_POST_default    xtlang    /digego/extempore/tree/v0.8.9/libs/external/ghttp.xtm
  • ghttp_perform_POST_json    xtlang    /digego/extempore/tree/v0.8.9/libs/external/ghttp.xtm
  • ghttp_perform_POST_string    xtlang    /digego/extempore/tree/v0.8.9/libs/external/ghttp.xtm
  • glfw_cursor_position_callback:GLFWcursorposfun    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_window_position_callback:GLFWwindowposfun    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • gui_find_leaf_postorder    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gui.xtm
  • h3d_object_pos    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/bullet.xtm
  • impc:ti:closure-in-first-position    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • ivl:transpose    scheme    /digego/extempore/tree/v0.8.9/libs/core/pc_ivl.xtm
  • kinect_get_joint_pos    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/kinect2.xtm
  • list-position    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • mtranspose    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • pc:transpose    scheme    /digego/extempore/tree/v0.8.9/libs/core/pc_ivl.xtm
  • position_update    xtlang    /digego/extempore/tree/v0.8.9/examples/external/shader-tutorials/particles.xtm
  • positive?    scheme    /digego/extempore/tree/v0.8.9/runtime/init.xtm
  • post    xtlang    /digego/extempore/tree/v0.8.9/examples/external/spectrogram.xtm
  • post:XTMRENDERCB    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/slideshow.xtm
  • post:XTMRENDERCB    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/kinect_vg.xtm
  • post:XTMRENDERCB    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/gstvideo_multi.xtm
  • post:XTMRENDERCB    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/qr-code.xtm
  • postrender:XTMRENDERCB    xtlang    /digego/extempore/tree/v0.8.9/examples/external/xtmrender5.xtm
  • set-mouse-pos    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/bullet.xtm
  • transposition    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math_ext.xtm
  • vmax    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • vmax    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • vmax    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • vmax    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • xtm_camera_pos    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • xtm_light_pos    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm