{"id":18607760,"url":"https://github.com/cfries/finmath-lib-cuda-extensions","last_synced_at":"2025-06-17T20:42:14.351Z","repository":{"id":77716938,"uuid":"82891540","full_name":"cfries/finmath-lib-cuda-extensions","owner":"cfries","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-26T11:07:08.000Z","size":3864,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-16T21:13:24.686Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cfries.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2017-02-23T06:14:43.000Z","updated_at":"2024-03-26T11:07:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"3c85882e-ee6a-4345-b1f2-727425ef2e4d","html_url":"https://github.com/cfries/finmath-lib-cuda-extensions","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cfries/finmath-lib-cuda-extensions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfries%2Ffinmath-lib-cuda-extensions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfries%2Ffinmath-lib-cuda-extensions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfries%2Ffinmath-lib-cuda-extensions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfries%2Ffinmath-lib-cuda-extensions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cfries","download_url":"https://codeload.github.com/cfries/finmath-lib-cuda-extensions/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfries%2Ffinmath-lib-cuda-extensions/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260439066,"owners_count":23009269,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-11-07T02:31:10.338Z","updated_at":"2025-06-17T20:42:09.333Z","avatar_url":"https://github.com/cfries.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# finmath lib cuda extensions\n- - - -\n**Enabling finmath lib with cuda via jcuda.**\n- - - -\nThe finmath lib cuda extension provide an implementation of the finmath lib interfaces `RandomVariableInterface` and `BrownianMotionInterface`` compatible with finmath lib 2.4.3 or later.\n\nSince objects of type `BrownianMotionInterface` are taking the role of a factory for objects of type `RandomVariableInterface`, injecting the `BrownianMotionCuda` will result in most finmath-lib models performing their calculations on the GPU - seamlessly.\n\n## Example\nCreate a vector of floats on the device\n```\nRandomVariableInterface randomVariable = new RandomVariableCuda(new float[] {-4.0f, -2.0f, 0.0f, 2.0f, 4.0f} );\n```\nperform some calculations (still on the gpu device)\n```\nrandomVariable = randomVariable.add(4.0);\nrandomVariable = randomVariable.div(2.0);\n```\nperform a reduction on the device\n```\ndouble average = randomVariable.getAverage();\n```\nor get the result vector\n```\ndouble[] result = randomVariable.getRealizations();\n```\n(note: the result is always double, since different implementation may support float or double on the device).\n\n## Installation\nOf course, you should have NVidia Cuda installed.\n\nIn addition, the finmath-lib-cuda-extensions requires jcuda. To install jcuda you should try the  \"mavenized\" version of jcuda.  To obtain and build the mavenized version of jcuda:\n```\ngit clone https://github.com/MysterionRise/mavenized-jcuda.git\ncd mavenized-jcuda\nmvn clean package\ncd ..\n```\n\nTo obtain and build the finmath-lib-cuda-extensions then do\n```\ngit clone https://github.com/cfries/finmath-lib-cuda-extensions.git\ncd finmath-lib-cuda-extensions\nmvn clean package\n```\nIf everything goes well, you will see unit test  run. Note that some of the tests mail fail if the device (GPU) has not enough memory. \n\n## References\n* [finmath lib Project documentation](http://finmath.net/finmath-lib/)\nprovides the documentation of the library api.\n* [finmath lib API documentation](http://finmath.net/finmath-lib/apidocs/)\nprovides the documentation of the library api.\n* [finmath.net special topics](http://www.finmath.net/topics)\ncover some selected topics with demo spreadsheets and uml diagrams.\nSome topics come with additional documentations (technical papers).\n\n## License\nThe code of \"finmath lib\", \"finmath experiments\" and \"finmath lib cuda extensions\" (packages\n`net.finmath.*`) are distributed under the [Apache License version\n2.0](http://www.apache.org/licenses/LICENSE-2.0.html), unless otherwise explicitly stated.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcfries%2Ffinmath-lib-cuda-extensions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcfries%2Ffinmath-lib-cuda-extensions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcfries%2Ffinmath-lib-cuda-extensions/lists"}