Advertisement
Guest User

Untitled

a guest
Mar 10th, 2018
85
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (defmethod (setf mref) ((value double-float) (matrix matrix-dfr) i j)
  2. (declare
  3. (type double-float value)
  4. (type fixnum i j)
  5. (optimize (debug 0) (safety 0) (speed 3)))
  6. (with-matrix-indexes (matrix i j)
  7. (multiple-value-bind (segment-id element-id) (floor j (the fixnum (segment-width matrix)))
  8. (let ((segment (aref (the (simple-array (simple-array double-float)) (segments matrix))
  9. (+ (the fixnum (* i (the fixnum (number-of-segments matrix)))) segment-id))))
  10. (declare
  11. (type fixnum segment-id element-id)
  12. (type (simple-array double-float) segment))
  13. (setf (aref segment element-id) value)))))
  14.  
  15. ;;;;;
  16. ; in: DEFMETHOD (SETF MREF) (DOUBLE-FLOAT MATRIX-DFR T T)
  17. ; (SETF (AREF LINEAR-ALGEBRA::SEGMENT LINEAR-ALGEBRA::ELEMENT-ID)
  18. ; LINEAR-ALGEBRA::VALUE)
  19. ; --> LET* FUNCALL SB-C::%FUNCALL (SETF AREF) SB-KERNEL:HAIRY-DATA-VECTOR-SET
  20. ; --> MULTIPLE-VALUE-BIND MULTIPLE-VALUE-CALL
  21. ; ==>
  22. ; #'(LAMBDA (&OPTIONAL (ARRAY) (SB-INT:INDEX) &REST #:G21)
  23. ; (DECLARE (IGNORE #:G21))
  24. ; (DECLARE (TYPE (SIMPLE-ARRAY DOUBLE-FLOAT 1) ARRAY)
  25. ; (TYPE DOUBLE-FLOAT SB-C::NEW-VALUE))
  26. ; (SB-KERNEL:DATA-VECTOR-SET ARRAY SB-INT:INDEX SB-C::NEW-VALUE))
  27. ;
  28. ; note: doing float to pointer coercion (cost 13) to "<return value>"
  29. ;
  30. ; compilation unit finished
  31. ; printed 1 note
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement