{"id":28682358,"url":"https://github.com/cometscome/matrixonlattice.jl","last_synced_at":"2026-02-10T18:32:48.844Z","repository":{"id":298459142,"uuid":"1000016343","full_name":"cometscome/MatrixOnLattice.jl","owner":"cometscome","description":"Matices on N dimensional lattice","archived":false,"fork":false,"pushed_at":"2025-08-12T07:29:57.000Z","size":33,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-19T00:19:11.184Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cometscome.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-11T06:26:43.000Z","updated_at":"2025-06-14T05:28:46.000Z","dependencies_parsed_at":"2025-06-11T08:29:49.254Z","dependency_job_id":null,"html_url":"https://github.com/cometscome/MatrixOnLattice.jl","commit_stats":null,"previous_names":["cometscome/matrixonlattice.jl"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cometscome/MatrixOnLattice.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cometscome%2FMatrixOnLattice.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cometscome%2FMatrixOnLattice.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cometscome%2FMatrixOnLattice.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cometscome%2FMatrixOnLattice.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cometscome","download_url":"https://codeload.github.com/cometscome/MatrixOnLattice.jl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cometscome%2FMatrixOnLattice.jl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29311147,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T17:48:59.043Z","status":"ssl_error","status_checked_at":"2026-02-10T17:45:37.240Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-14T02:08:41.340Z","updated_at":"2026-02-10T18:32:48.826Z","avatar_url":"https://github.com/cometscome.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MatrixOnLattice\n\n[![Build Status](https://github.com/cometscome/MatrixOnLattice.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/cometscome/MatrixOnLattice.jl/actions/workflows/CI.yml?query=branch%3Amain)\n\n\n# example\n\n## CUDA test\n\n```julia\nusing CUDA\nusing MatrixOnLattice\nusing Test\nusing LinearAlgebra\nfunction test()\n    NX = 16\n    NY = 16\n    NZ = 16\n    NT = 16\n    NC = 3\n\n    U = MatrixOnLattice4D(NC, NX, NY, NZ, NT)\n    U1 = Randomfield(NC, NX, NY, NZ, NT)\n    U2 = Randomfield(NC, NX, NY, NZ, NT)\n    U3 = Randomfield(NC, NX, NY, NZ, NT)\n\n    substitute!(U, U1)\n    mul!(U, U2, U3)\n    @time mul!(U, U2, U3)\n    @time mul!(U, U2, U3)\n\n    val = tr(U)\n    println(\"cpu: \", val)\n\n\n    Ug = MatrixOnLattice4D(NC, NX, NY, NZ, NT; accelarator=\"cuda\")\n    Ug1 = MatrixOnLattice4D(NC, NX, NY, NZ, NT; accelarator=\"cuda\")\n    Ug2 = MatrixOnLattice4D(NC, NX, NY, NZ, NT; accelarator=\"cuda\")\n    substitute!(Ug, U1)\n    substitute!(Ug1, U2)\n    substitute!(Ug2, U3)\n\n    println(typeof(Ug))\n\n    mul!(Ug, Ug1, Ug2)\n    @time mul!(Ug, Ug1, Ug2)\n    @time mul!(Ug, Ug1, Ug2)\n    substitute!(U, Ug)\n    val2 = tr(U)\n    println(\"cuda: \", val)\n    @test val2 ≈ val\n\nend\ntest()\n```\n\n## JACC test\n[JACC](https://github.com/JuliaORNL/JACC.jl) version\n\n\"\nCPU/GPU performance portable layer for Julia\n\nJACC.jl follows a function as a argument approach in combination with the power of Julia's ecosystem for multiple dispatch, GPU access via JuliaGPU back ends, and package extensions since Julia v1.9 . Similar to portable layers like Kokkos, users would pass a size and a function including its arguments to a parallel_for or parallel_reduce function. \n\"\n\n```julia\nusing CUDA\nusing JACC\nJACC.@init_backend\n\nusing MatrixOnLattice\nusing Test\nusing LinearAlgebra\n\nfunction test()\n    NX = 16\n    NY = 16\n    NZ = 16\n    NT = 16\n    NC = 3\n\n    U = MatrixOnLattice4D(NC, NX, NY, NZ, NT)\n    U1 = Randomfield(NC, NX, NY, NZ, NT)\n    U2 = Randomfield(NC, NX, NY, NZ, NT)\n    U3 = Randomfield(NC, NX, NY, NZ, NT)\n\n    substitute!(U, U1)\n    mul!(U, U2, U3)\n    @time mul!(U, U2, U3)\n    @time mul!(U, U2, U3)\n\n    val = tr(U)\n    println(\"cpu: \", val)\n\n\n    Ug = MatrixOnLattice4D(NC, NX, NY, NZ, NT; accelarator=\"cuda\")\n    Ug1 = MatrixOnLattice4D(NC, NX, NY, NZ, NT; accelarator=\"cuda\")\n    Ug2 = MatrixOnLattice4D(NC, NX, NY, NZ, NT; accelarator=\"cuda\")\n    substitute!(Ug, U1)\n    substitute!(Ug1, U2)\n    substitute!(Ug2, U3)\n\n    println(typeof(Ug))\n\n    mul!(Ug, Ug1, Ug2)\n    @time mul!(Ug, Ug1, Ug2)\n    @time mul!(Ug, Ug1, Ug2)\n    substitute!(U, Ug)\n    val2 = tr(U)\n    println(\"cuda: \", val)\n    @test val2 ≈ val\n\n\n\n    Uj = MatrixOnLattice4D(NC, NX, NY, NZ, NT; accelarator=\"jacc\")\n    Uj1 = MatrixOnLattice4D(NC, NX, NY, NZ, NT; accelarator=\"jacc\")\n    Uj2 = MatrixOnLattice4D(NC, NX, NY, NZ, NT; accelarator=\"jacc\")\n\n    substitute!(Uj, U1)\n    substitute!(Uj1, U2)\n    substitute!(Uj2, U3)\n\n\n    mul!(Uj, Uj1, Uj2)\n    @time mul!(Uj, Uj1, Uj2)\n    @time mul!(Uj, Uj1, Uj2)\n\n    substitute!(U, Uj)\n\n    val = tr(U)\n    println(\"jacc: \", val)\n\n    println(typeof(Uj))\n    return\n    val = tr(U)\n    println(val)\nend\ntest()\n```\n\n## Single precision\n\n```julia\nusing CUDA\nusing MatrixOnLattice\nusing Test\nusing LinearAlgebra\nfunction test32()\n    NX = 16\n    NY = 16\n    NZ = 16\n    NT = 16\n    NC = 3\n\n    U = MatrixOnLattice4D(NC, NX, NY, NZ, NT,dtype=ComplexF32)\n    U1 = Randomfield(NC, NX, NY, NZ, NT,dtype=ComplexF32)\n    U2 = Randomfield(NC, NX, NY, NZ, NT,dtype=ComplexF32)\n    U3 = Randomfield(NC, NX, NY, NZ, NT,dtype=ComplexF32)\n\n    substitute!(U, U1)\n    mul!(U, U2, U3)\n    @time mul!(U, U2, U3)\n    @time mul!(U, U2, U3)\n\n    val = tr(U)\n    println(\"cpu: \", val)\n\n\n    Ug = MatrixOnLattice4D(NC, NX, NY, NZ, NT; accelarator=\"cuda\",dtype=ComplexF32)\n    Ug1 = MatrixOnLattice4D(NC, NX, NY, NZ, NT; accelarator=\"cuda\",dtype=ComplexF32)\n    Ug2 = MatrixOnLattice4D(NC, NX, NY, NZ, NT; accelarator=\"cuda\",dtype=ComplexF32)\n    substitute!(Ug, U1)\n    substitute!(Ug1, U2)\n    substitute!(Ug2, U3)\n\n    println(typeof(Ug))\n\n    mul!(Ug, Ug1, Ug2)\n    @time mul!(Ug, Ug1, Ug2)\n    @time mul!(Ug, Ug1, Ug2)\n    substitute!(U, Ug)\n    val = tr(U)\n    println(\"cuda: \", val)\n\n\nend\ntest32()\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcometscome%2Fmatrixonlattice.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcometscome%2Fmatrixonlattice.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcometscome%2Fmatrixonlattice.jl/lists"}