Recent Posts

Pages: [1] 2 3 ... 10
1
The Workshop / Re: Multiply matrix MxM by KxK real4 any size
« Last post by Siekmanski on Today at 05:09:34 AM »
The results,
2
Romper Room / Re: How programming works.....
« Last post by Siekmanski on Today at 04:37:36 AM »
Yes, in modern time religions accept science such as Darwin's Theory Of Evolution because it is a proven fact.

Good, bad and evil ( morals and ethics ) is a human learning process and is evenly divided and present amongst atheists and theists.

Don't forget I respect everybody's views.
It's not my intention to sound rude.
It's the Dutch culture to be direct and not to be "politically correct".
This is the Dutch way to explain the difference between Atheist and Theist,

Atheist: relies on science where no deities are needed to explain the workings of the Universe.
Theist: relies on a holy book and the need of deities ( born out of ignorance or misunderstanding ) to explain the workings of the Universe.

This is my last comment on this topic, else it will be a never ending discussion.
Let's create CODE not WAR.  :t
4
The Laboratory / Re: Simple floating point macros.
« Last post by RuiLoureiro on Today at 04:01:58 AM »
 :biggrin: 
Hi Hutch
    seems OK, all things are correct and FPU is cleaned at the end and at the end of each step (or case)  :eusa_clap:
5
The Workshop / Multiply matrix MxM by KxK real4 any size
« Last post by RuiLoureiro on Today at 03:44:39 AM »
Hi all,
       Here we have 1 version to multiply any square matrix MxM by
       any square matrix KxK (M=K) using SSE instructions and 1 that uses FPU.

       With this work we may solve all cases as we want:

            invoke      MultiplyMxN_NxK_v6SSE, pMatX, pMatY, pMatXY     ; general case
            invoke      MultiplyMxM_MxM_v1SSE, pMatX, pMatXY              ; particular case Y=X
            invoke      MultiplyMxM_KxK_v1SSE, pMatX, pMatY, pMatXY     ; particular case Y<>X

note: each matrix used has a dimension behind the address and it seems to be the best
         way to test the procedures. If you want modify the procedure and pass the dimensions
         of each matrix. Note also that each procedure doesnt call any other procedure
         inside, so the code is large or very large especially MultiplyMxN_NxK_v6SSE

Quote
      VERSION 1:
                PROCEDURE:  MultiplyMxM_KxK_v1SSE
               
                FILE:           multiplySSEMxM_KxK_v1.inc
               
                MACROS:     multiplyMxN_KxK_v2A.mac
                                  multiplyMxN_KxK_v2B.mac
                                  basicmulMxN_KxK_v1.mac

      VERSION FPU:
                PROCEDURE:  MultiplyMxM_KxK_v1FPU
               
                FILE:              multiplyFPUMxM_KxK_v1.inc


    DOCUMENTATION:          TEXT_ABOUT_MULTIPLY_SSE_REAL4.txt

    MATRIX DEFINITION:      We must define any matrixX as this

                            ALIGN 16
                            dd ?
                            dd ?
                            dd M   ; <<--- number of columns
                            dd M   ; <<--- number of lines
                   matrixX  dd (M*M) dup (?)         

                            If we want to alloc memory, see the file AllocMemory.inc

    VERIFY SSE PROCEDURES:  Use multiplyMxM_KxK_v1.exe/asm

    Please test it in your CPU (i5/i7/AMD).
    Use ExecuteTestmultiplyMxM_KxK_SSEv1.bat and post the file ResultsmultiplyMxM_KxK_v1.txt.

Good luck
RuiLoureiro

Some results: :t
Quote
***** Time table - LoopCount =100 000 *****

Intel(R) Core(TM) i7-4930K CPU @ 3.40GHz (SSE4)

    50  cycles, MultiplyMxM_KxK_v1SSE,  MatrixX4x4   * MatrixY4x4
   319  cycles, MultiplyMxM_KxK_v1FPU,  MatrixX4x4   * MatrixY4x4
   
   264  cycles, MultiplyMxM_KxK_v1SSE,  MatrixX8x8   * MatrixY8x8
  2031  cycles, MultiplyMxM_KxK_v1FPU,  MatrixX8x8   * MatrixY8x8
   
   745  cycles, MultiplyMxM_KxK_v1SSE,  MatrixX10x10 * MatrixY10x10
  3512  cycles, MultiplyMxM_KxK_v1FPU,  MatrixX10x10 * MatrixY10x10
   
   769  cycles, MultiplyMxM_KxK_v1SSE,  MatrixX12x12 * MatrixY12x12
  5827  cycles, MultiplyMxM_KxK_v1FPU,  MatrixX12x12 * MatrixY12x12
   
   891  cycles, MultiplyMxM_KxK_v1SSE,  MatrixX11x11 * MatrixY11x11
  4573  cycles, MultiplyMxM_KxK_v1FPU,  MatrixX11x11 * MatrixY11x11
   
  1402  cycles, MultiplyMxM_KxK_v1SSE,  MatrixX13x13 * MatrixY13x13
  7312  cycles, MultiplyMxM_KxK_v1FPU,  MatrixX13x13 * MatrixY13x13
 
  1792  cycles, MultiplyMxM_KxK_v1SSE,  MatrixX14x14 * MatrixY14x14
  9026  cycles, MultiplyMxM_KxK_v1FPU,  MatrixX14x14 * MatrixY14x14
 
  1806  cycles, MultiplyMxM_KxK_v1SSE,  MatrixX16x16 * MatrixY16x16
13263  cycles, MultiplyMxM_KxK_v1FPU,  MatrixX16x16 * MatrixY16x16
 
  1980  cycles, MultiplyMxM_KxK_v1SSE,  MatrixX15x15 * MatrixY15x15
11000  cycles, MultiplyMxM_KxK_v1FPU,  MatrixX15x15 * MatrixY15x15
 
  3343  cycles, MultiplyMxM_KxK_v1SSE,  MatrixX17x17 * MatrixY17x17
15792  cycles, MultiplyMxM_KxK_v1FPU,  MatrixX17x17 * MatrixY17x17
 
  3410  cycles, MultiplyMxM_KxK_v1SSE,  MatrixX20x20 * MatrixY20x20  ; <<< align 16 effect
25353  cycles, MultiplyMxM_KxK_v1FPU,  MatrixX20x20 * MatrixY20x20
 
  3690  cycles, MultiplyMxM_KxK_v1SSE,  MatrixX18x18 * MatrixY18x18
18647  cycles, MultiplyMxM_KxK_v1FPU,  MatrixX18x18 * MatrixY18x18
 
  4119  cycles, MultiplyMxM_KxK_v1SSE,  MatrixX19x19 * MatrixY19x19
21822  cycles, MultiplyMxM_KxK_v1FPU,  MatrixX19x19 * MatrixY19x19
 
  14019  cycles, MultiplyMxM_KxK_v1SSE,  MatrixX32x32 * MatrixY32x32  ; 13.8% ...
101255  cycles, MultiplyMxM_KxK_v1FPU,  MatrixX32x32 * MatrixY32x32  ; 7.2 * 14019

EDIT: please, replace the file StringTable... because the name of the procedure is not ...MxM_MxM but ...MxM_KxK
6
The Laboratory / Re: Simple floating point macros.
« Last post by hutch-- on Today at 03:42:18 AM »
This is the form for sequential additions. 1 arg macro, manual and 2 arg macro. The versions with fldz is how I would do loop code, for a single addition, the 2 argument macro version has an extra load but 1 less add.

; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

    include \masm32\include64\masm64rt.inc

    fpinit MACRO                ;; initialise the x87 co-processor
      fninit
      fldz
    ENDM

    fpadd MACRO arg1, arg2      ;; add a number
      fld arg1
        IFNB <arg2>
          fld arg2
        ENDIF
      faddp
    ENDM

    .code

; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

 entry_point proc

    LOCAL buff[32]:BYTE
    LOCAL pbuf  :QWORD
    LOCAL addval:QWORD ; REAL8  ; either will do as a LOCAL
    LOCAL rslt  :QWORD ; REAL8

    mrm addval, FLT8(111.111)   ; get a pseudo immediate
    mov pbuf, ptr$(buff)        ; get buffer pointer

  ; -----------------------------
  ; start macro code
  ; -----------------------------
    fpinit

    fpadd addval                ; sequential additions
    fpadd addval
    fpadd addval
    fpadd addval

    fstp rslt                   ; store result & pop

    invoke fptoa,rslt,pbuf      ; convert addval to string
    conout pbuf,lf              ; display at console

  ; -----------------------------
  ; identical manual mnemonic code
  ; -----------------------------
    fldz                        ; with FLDZ

    fld addval
    faddp
    fld addval
    faddp
    fld addval
    faddp
    fld addval
    faddp

    fstp rslt                   ; store result & pop

    invoke fptoa,rslt,pbuf      ; convert addval to string
    conout pbuf,lf              ; display at console

  ; -----------------------------
  ; alternate macro code - no fldz
  ; -----------------------------
    fpadd addval, addval        ; sequential additions
    fpadd addval
    fpadd addval

    fstp rslt                   ; pop stack

    invoke fptoa,rslt,pbuf      ; convert addval to string
    conout pbuf,lf              ; display at console

    waitkey
    .exit

 entry_point endp

; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

    end
7
Romper Room / Re: How programming works.....
« Last post by mineiro on Today at 02:25:34 AM »
Can you give me 1 example of scientific contribution to society by religion over say, the last 300 years?
Cmon man, you're talking about science; science and religion can walk together.
Recent examples of war have shown us how science has evolved, and I do not mean science badly.
I'm tired.
8
Romper Room / Re: How programming works.....
« Last post by caballero on Today at 01:01:12 AM »
The more I read, the more sense it takes for me that European atheism is simply the antithesis of Christianity. That is, it is not strictly speaking atheism, so it is not a religion either.

That the current western society, with its lights and shadows is a consequence of Christianity, I think it is evident. Even atheism is also, by what is seen.

It is evident that Christianity committed and commits its atrocities, but it seems that the allegations against are so furious and untimely that they reveal a deep resentment against. But why do you always forget things that are already happening in Europe? I do not understand much of what she says, but I think the content is rough, to say the least. Worse yet, noone can talk about it.

Is there really an unconventional war between atheism and Christianity in Europe to which traditional rival religions have been invited to contend in an attempt to increase their potential?

If we restrict the atrocities of the Crusades to Christianity, I think we deliberately ignore half of the story.



Regarding the Spanish Inquisition, I must confess that I come from my prejudice that I do not believe that it was especially bad compared to the rest of Europe. I transcribe and note some paragraphs from the historian del Junco:

Quote from: del Junco
if in Spain the Inquisition was founded in 1478 in France it existed since 1184.

Quote from: del Junco
In the period from 1559 to 1566 one hundred people were executed by the Inquisition in Spain, in France two hundred and in England three hundred, while historians such as Henry Charles Lea argued that the Spanish prisons of the Inquisition were the least harsh in Europe between the 15th century and XVII, has given as examples Del Junco.

Quote from: del Junco
On the persistence of this negative image for Spain over the centuries, Del Junco has pointed out that "Holland, England and France made a skilful use of the printing press against Spain, which did not know how to defend themselves", issuing "invented" engravings in which It showed torture priests who have successfully circulated until the nineteenth century, as part of the Black Legend encouraged against Spain when it was the world's leading power, since the sixteenth century.

https://www.abc.es/historia/abci-falsa-leyenda-negra-inquisicion-espanola-solo-18-por-ciento-quemado-hoguera-201512040335_noticia.html
9
The Laboratory / Re: Other floating point macros.
« Last post by RuiLoureiro on Today at 12:54:40 AM »

 :biggrin: Hi six_L
             You are right, we get that wrong results you got so the problem is in the converter i guess also because you doesnt do anything else and the code is very simple.
See you
 :t
10
Romper Room / Re: How programming works.....
« Last post by Siekmanski on August 16, 2018, 11:40:25 PM »
The western society we know today has only reached this level because of the Catholic church.

I disagree with you, we could by at a much higher level in society without religious indoctrination.

Knowledge of Greek science deteriorated in Western Europe during the Middle Ages, caused by Christianity.
We lost at least 1000 years of scientific progression. ( Damn, I could be on a spaceship exploring the Universe by now.  :biggrin:)
We slowly picked up science again in the last 300 years. (in the fear not to be killed by religious fanatics.)

I'll keep it by 1 example,

How is it possible we live twice as long as 150 years ago?
Thanks to natural sciences (e.g. biology, chemistry, physics) and not to Christianity.

Can you give me 1 example of scientific contribution to society by religion over say, the last 300 years?
Pages: [1] 2 3 ... 10