Applications involving AI and Machine Learning are rapidly improving our ability to plan treatments efficiently and effectively by aiding human planners and physicians during the iterative process of planning. These algorithms involve iterating and training over a large number of cases or situations and can become computationally intractable due to bottlenecks in the dose and fluence calculations. We investigate the effect of kernel truncation and sparsity on the dose and fluence calculation and present a lightweight portable algorithm for implementation into AI/ML applications.We designed our algorithm around the idea of beamlet and voxel discrimination allowing our dose kernel to truncated and the resulting deposition matrix to be highly sparse. We validated our dose calculation against calculations of varying field-sizes in water and patient anatomy against the AAA algorithm. The fluence optimization was tested on the TG-119 prostate phantom with common dosimetric end-points.In a cubic water phantom, the calculation algorithm had errors of less than 1% for all field sizes except for field sizes larger than 30 cm. The errors for field sizes greater than 30 cm were only slightly larger than 1%. In a patient anatomy the dose calculation had a dose difference of less than 0.10 cGy with a dose of 1 cGy at the iso-center. The fluence optimizer produced a plan with the following dose-volume differences from the objectives: PTV .1%, Rectum 2.9%, and Bladder 2.85%. The truncation and sparsity introduced an up to 17x speed up over a full dense calculation.The introduction of sparsity and truncation into the dose and fluence calculation produced a sizable speed-up while not diminishing accuracy allowing for the algorithm to be introduced into AI/ML applications which involve many calls to the dose/fluence calculation.